Thumbnails using images with transparency

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?".
rpalmer
Posts: 9
Joined: 2014-01-30T03:58:47-07:00
Authentication code: 6789

Re: Thumbnails using images with transparency

Post by rpalmer »

Well, I guess you can't win all the time. If however you guys could help me have a tiled checkerboard sized rgb jpg thumbnail on those it can then it will still be a win :D

I currently run

Code: Select all

convert -colorspace sRGB -thumbnail {X}x{Y} {in} {out}
X - desired width
Y - desired height
in - Input file
out - Output thumbnail file
rpalmer
Posts: 9
Joined: 2014-01-30T03:58:47-07:00
Authentication code: 6789

Re: Thumbnails using images with transparency

Post by rpalmer »

Duplicated reply by mistake so removed, sorry!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnails using images with transparency

Post by fmw42 »

convert -thumbnail 80x80 -density 72 -units pixelsperinch in.png pattern:checkerboard +swap -composite out.jpg
You must tell the command how big to tile out the checkerboard. All you are doing is inserting the 8x8 checkerboard image onto your image.

This works for me.

convert in.png -thumbnail 80x80 -size 80x80 tile:pattern:checkerboard +swap -composite -density 72 -units pixelsperinch out1.jpg

Note that you should specify the input before resizing using -thumbnail. For eps input you must specify a density before the input . Output jpg units and should come just before the output.
Post Reply