I want to generate one single JPEG image file for PSD formats using any software.
I tried ImageMagick but it’s converting every layer into different images.
I also tried exiftool. It got converted to one single image but quality is very bad.
This is my code in ImageMagick:
convert filename.psd -thumbnail 340x340 testing.jpg
This is exiftool :
exiftool -Photoshop:PhotoshopThumbnail -b -resize filename.psd >z1.jpg
3
Answers
I got this answer:
We can change the quality parameter.
To generate thumbnails, you should run:
or
or
or similar. (Find out yourself what the different sizes will be when varying between
340x340
,340x
andx340
.)Note, the key parameter to get rid of the unwanted ‘1 image per layer’ output: you have to insert
-flatten
into the command.Vipsthumbnail in libvips can do this:
See the libvips docs
and if it’s ok for you just to use the psd embedded thumbnail (as small as 160×160 in px),
it’s super fast to extract thumbnail image with psd-tools: