Convert tiff to jpeg is creating several images when having transparency
Posted: 2018-07-24T06:55:00-07:00
Hello,
I'm beggining with Image Magick and I'm currently trying to convert and resize a TIFF file to a JPEG file, usually smaller than the original one.
I have two assets : bag.tif and book.tif
Running :
convert bag.tiff -resize 1280x1280 bag.jpg
is correctly doing the conversion.
However, running
convert book.tiff -resize 1280x1280 book.tiff is creating two images :
- One with a black background instead of the transparency (ok, why not as jpeg doesn't handle transparency)
- A second one which is "zoomed" on the non transparent part of the image
Cf:
My goal is that the command generate only one jpeg image (and if possible with a white background instead of a black one.
Can someone explain why I have to image with this command when there is transparency and if possible, could you please provide me a command that will work for both conversion (bag and book) ?
Many thanks in advance,
MisterJpa
I'm beggining with Image Magick and I'm currently trying to convert and resize a TIFF file to a JPEG file, usually smaller than the original one.
I have two assets : bag.tif and book.tif
Running :
convert bag.tiff -resize 1280x1280 bag.jpg
is correctly doing the conversion.
However, running
convert book.tiff -resize 1280x1280 book.tiff is creating two images :
- One with a black background instead of the transparency (ok, why not as jpeg doesn't handle transparency)
- A second one which is "zoomed" on the non transparent part of the image
Cf:
My goal is that the command generate only one jpeg image (and if possible with a white background instead of a black one.
Can someone explain why I have to image with this command when there is transparency and if possible, could you please provide me a command that will work for both conversion (bag and book) ?
Many thanks in advance,
MisterJpa