Page 1 of 1

Problem with extent and background colour

Posted: 2014-10-07T00:09:19-07:00
by manu_l
I have a problem to convert files from tif to jpg. The size of the source pictures are different (81x100, 363x400,...) and it should result square pictures like 100x100, 300x300, 600x600. The transparent background in the tif-files and the extented space should be white. I've tryed this command:

Code: Select all

convert -resize 600x600 -background white -extent 600x600 -gravity center /pictures/10_test/90_00.tif /pictures/10_test/90_00.jpg
The problem is that the extented space is black:

source: 363x400
Image
result: 600x600
Image

IM-Version: 6.2.8


Can anyone help me with that problem?

Re: Problem with extent and background colour

Posted: 2014-10-07T07:03:13-07:00
by snibgo
v6.2.8 is very old. I suggest you update to the current version.

Then put the operations in the natural order: read an image, process it, write it.

Code: Select all

convert in.tif -resize 600x600 -gravity center -background white -extent 600x600 out.jpg
In v6.2.8, putting "-background white" before "-extent 600x600" might help. I don't have such an old version and can't test it.

Re: Problem with extent and background colour

Posted: 2014-10-07T07:10:43-07:00
by manu_l
Thank you for help - I will update the software to v6.8.9 and test it again :-)

Re: Problem with extent and background colour

Posted: 2014-10-13T00:41:45-07:00
by manu_l
After updating IM it works with the code above perfect! :-)