Jump to content


Photo

Create a PSD preview


  • Please log in to reply
4 replies to this topic

#1 Sasuun

Sasuun
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 04 October 2006 - 01:55 AM

Does anyone know of a way to display a preview for a psd using PHP, maybe the GD library. photoshop generates previews as part of the file, so does anyone have an idea of how to retrieve it?

#2 Hi I Am Timbo

Hi I Am Timbo
  • Members
  • PipPipPip
  • Advanced Member
  • 109 posts

Posted 04 October 2006 - 04:49 AM

I would start by looking at the file and seeing if there is an obvious preview portion in it.  If you can find that, you can likely extract it manually.

#3 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 04 October 2006 - 12:21 PM

I'm actually trying to do the same thing for a project, so far, I have somewhat got it working. I'm passing it through ImageMagick with a command like:

convert old.psd -flatten new.gif

If the psd has a transparent background, it is converted to white - any ideas on preserving the transparency?

#4 Sasuun

Sasuun
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 04 October 2006 - 03:17 PM

maybe using something like imagecolortransparent() would help preserve it

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 04 October 2006 - 03:20 PM

You can set up a cgi to transform the image to jpg, and pass it back to your php page, and work with it that way.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users