skip to Main Content

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



  1. Chosen as BEST ANSWER

    I got this answer:

    convert filename.psd -flatten -quality 100 z.jpg

    We can change the quality parameter.

  2. To generate thumbnails, you should run:

     convert filename.psd -flatten -thumbnail 340x340 filename-thumb.jpg


     convert filename.psd -flatten -thumbnail 340x    filename-thumb.png


     convert filename.psd -flatten -thumbnail    x340 filename-thumb.gif

    or similar. (Find out yourself what the different sizes will be when varying between 340x340, 340x and x340.)

    Note, the key parameter to get rid of the unwanted ‘1 image per layer’ output: you have to insert -flatten into the command.

    Login or Signup to reply.
  3. Vipsthumbnail in libvips can do this:

    Vipsthumbnail filename.psd --size 300x

    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:

    from psd_tools import PSDImage'filename.psd').thumbnail().save("thumb.png")
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top