PSD convert to.., use of file.psd[0] vs file.psd

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
nileshp

PSD convert to.., use of file.psd[0] vs file.psd

Post by nileshp »

hey,

I notice something odd when i try to convert images that are *.psd format. multi-layers.


I get very odd results with multi-layer images using the normal...

convert -flatten file.psd newfile.jpg


yet the solution for me was to use...

convert -flatten file.psd[0] newfile.jpg

doing that, the image convert out more correct, as expected.


the psd files are photoshop sample files , found in adobe/photoshop/samples/ folder..

test i was trying to convert psd to jpg...

DVDMenu.psd(convert good with use of [0] at end of filename, yet odd results use convert -flatten name.psd new.jpg ...vs.. convert -flatten name.psd[0] new.jpg

Fish.psd( convert odd, color are very odd, not sure whats up with this file, its also mutli-layer)

Flower.psd (convert real good with use of convert -flatten Flower.psd[0] new.jpg .. vs.. convert -flatten Flower.psd new.jpg

..

any suggestion or tips on correctly converting PSD to JPG? flatten all layers (multi-layer psd file , alpha , text layers etc..)

so far, i am not 100% sure why the [0] would work good vs not using [0]

thanks for any feedback,
igorb

Re: PSD convert to.., use of file.psd[0] vs file.psd

Post by igorb »

hello,
i'm using ImageMagick-6.4.0-4-Q16 for Windows, and
i'm having the same problem with photoshop's Fish.psd file, when i try to
convert it to JPG. I run the following command:

convert Fish.psd[0] -flatten Fish.jpg

where my Fish.psd is here:
http://www.freewebs.com/extramilk/Fish.psd

and i get the following JPG as result:
http://www.freewebs.com/extramilk/Fish.jpg

, and i'm getting some strange colors for this JPG file.

Can someone help me in order to convert this PSD correctly?
Is this a problem with ImageMagick, or am i doing something wrong?

Thanx,
Igor
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PSD convert to.., use of file.psd[0] vs file.psd

Post by magick »

Try this command
  • convert Fish.psd[0] Fish.png
This appears to give reasonable results. The -flatten option composites the fish with the white background making the colors look unattractive.
igorb

Re: PSD convert to.., use of file.psd[0] vs file.psd

Post by igorb »

Thanx,

i've tried
convert Fish.psd[0] Fish.jpg
and it works just perfect for all other PSD files,
but for Fish.psd the result is not good enough.

Actually i think i found the reason, well it's because Fish.psd file
is 16bit, and when i make it 8bit color, conversion is successful.

Is there any way to make this conversion (16bit PSD to 8bit, and then to JPG) using ImageMagick
in single command, or something similar?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PSD convert to.., use of file.psd[0] vs file.psd

Post by magick »

Add -depth 8 to your command line or -colors 256. Either converts a 16-bit image to 8-bits.
igorb

Re: PSD convert to.., use of file.psd[0] vs file.psd

Post by igorb »

Well, it seems this doesn't work.

I'm trying first to convert 16bit Fish.psd to 8bit Fish8bit.psd, and then to convert
Fish8bit.psd to Fish.jpg, but this is not working at all.

I'm using following commands:

Code: Select all

convert Fish.psd -depth 8 Fish8bit.psd
and

Code: Select all

convert Fish8bit.psd[0] Fish.jpg
, and here are the results

http://www.freewebs.com/extramilk/Fish8bit.psd
http://www.freewebs.com/extramilk/Fish.jpg

Am i doing something wrong? How to fix this?
Post Reply