Thumbnail creation of PSD file with text in it

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
anjanisingh22
Posts: 3
Joined: 2018-07-25T08:31:51-07:00
Authentication code: 1152

Thumbnail creation of PSD file with text in it

Post by anjanisingh22 »

We are using Image magick with Version: ImageMagick 7.0.8-7 to thumbnail of PSD file with text in it.
We are running the same in Linux environment.We used the following command to generate the thumbnail.

convert src.psd -intent relative -density 72 -sample “500x375>” -quality 80 -colorspace sRGB -strip -auto-orient dest.jpg

The thumbnail generation works fine. I am able to open the file and check the thumbnail. The problem is that the generated thumbnail is not opening in browser.

When I went a deeper, i found that the following are the properties of the generated thumbnail image. (used EXIF tool)

File Type : PSD
File Type Extension : psd
MIME Type : application/vnd.adobe.photoshop
I think the mimetype and file extensions are preventing it from rendering in the browser.


On other hand every thing works fine with ImageMagick 7.0.5-5 Q16 x86_64 2017-04-25. I do have windows installer but not able to find installer for unix env.

Thanks. Any help or directions to solve this problem is appreciated.!


Regards,
AS
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnail creation of PSD file with text in it

Post by fmw42 »

try

Code: Select all

convert src.psd[0] -auto-orient -strip -colorspace sRGB -density 72 -sample “500x375>” -quality 80 dest.jpg
-intent won't help if you are not converting colorspace using profiles.

Use [0] to get the psd flattened layer.
anjanisingh22
Posts: 3
Joined: 2018-07-25T08:31:51-07:00
Authentication code: 1152

Re: Thumbnail creation of PSD file with text in it

Post by anjanisingh22 »

Thanks quick response. As per suggestion run below command but same issue.

convert src.psd[0] -auto-orient -strip -colorspace sRGB -density 72 -sample "500x375>" -quality 80 des_thumb.JPG

Run identify on output file and got below response:
identify des_thumb.JPG
des_thumb.JPG[0] PSD 250x375 250x375+0+0 8-bit sRGB 273086B 0.000u 0:00.000
des_thumb.JPG[1] PSD 250x375 250x375+0+0 8-bit sRGB 273086B 0.000u 0:00.000


exiftool on output image gave below response:
File Type : PSD
File Type Extension : psd
MIME Type : application/vnd.adobe.photoshop

Thanks,
Anjani
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnail creation of PSD file with text in it

Post by fmw42 »

Since you are on IM 7 (sorry I missed that), try

magick src.psd[0] -auto-orient -strip -colorspace sRGB -density 72 -sample “500x375>” -quality 80 dest.jpg

What do you get from

magick -version

Does it include JPG?

Have you tried upgrading IM 7. It is now at 7.0.8-7. It seems to work fine for me and EXIFTOOL shows JPG.

Can you post your PSD file to some free hosting service that won't change the format and post the URL here?
anjanisingh22
Posts: 3
Joined: 2018-07-25T08:31:51-07:00
Authentication code: 1152

Re: Thumbnail creation of PSD file with text in it

Post by anjanisingh22 »

Thanks for response @fmw42

I run command with magick but no luck.

magick -version gives below response:

Version: ImageMagick 7.0.8-7 Q16 x86_64 2018-07-18 https://www.imagemagick.org


Thanks,
Anjani
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnail creation of PSD file with text in it

Post by fmw42 »

anjanisingh22 wrote: 2018-07-25T10:24:21-07:00 Thanks for response @fmw42

I run command with magick but no luck.

magick -version gives below response:

Version: ImageMagick 7.0.8-7 Q16 x86_64 2018-07-18 https://www.imagemagick.org


Thanks,
Anjani

Did it now show more than that? When I run the command on my Mac, I get (note the Delegates line):

Code: Select all

magick -version
Version: ImageMagick 7.0.8-7 Q16 x86_64 2018-07-21 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps raw rsvg tiff webp x xml zlib
Post Reply