different images when using different versions of convert

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?".
Post Reply
v.svetoslavov
Posts: 11
Joined: 2013-03-11T07:08:40-07:00
Authentication code: 6789

different images when using different versions of convert

Post by v.svetoslavov »

Hello guys

On my system (kubuntu 13.10 x64) the following command

Code: Select all

convert -size 120x120 xc:none -fill white -draw 'rectangle 0,0,120,120' \( source.jpg -bordercolor "#EAEAEA" -border 1x1 \) -gravity center -composite JPG:test1.jpg
on IM 6.5.2-5 produces the following image
Image

The same command on IM 6.7.7 produces the following image:
Image

The source file is:
Image

On other peoples systems, also with ubuntu, the problem does not occur. I used to have this problem some time ago and the reason for it was a modified delegates.xml that I was using. This time I checked - the delegates.xml is the same on all systems (checked with -list delegates)

Can you give me any clues on what can be the reason for such difference?

Thanks in advance.

Best regards,
Vasil Svetoslavov
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: different images when using different versions of conver

Post by fmw42 »

I have no reason to explain why your 6.5.2-5 version of IM would do that only on one computer. I suspect there is something odd with the install or you might have multiple version of IM installed. In any case, that versions is ancient and probably has many bugs that have been fixed in the over 350 versions since. I would suggest you either re-install or better upgrade.
v.svetoslavov
Posts: 11
Joined: 2013-03-11T07:08:40-07:00
Authentication code: 6789

Re: different images when using different versions of conver

Post by v.svetoslavov »

Hi
Thanks for your quick reply.

I do indeed have both versions installed. Therefore I specify the full path in the command line - in my case - /opt/bin/convert

While I found agree that the IM version is ancient, I need to work with that exact version...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: different images when using different versions of conver

Post by fmw42 »

I doubt that there is anything that can be done. Such an old version is likely to have bugs. If you have two versions of IM actually installed, there may be conflicts, or one version may need different versions of delegates. If you have the same version on two different systems and one works and the other does not, then I can only assume it is a conflict. But you could try re-installing and see if that helps.

Why must you use such an old version? Seems like upgrading is the best answer.

If you post a link to your input image, we can certainly test it or check it for problems. There does not appear to be anything in your command that would suggest a way for the result to be magnified.
v.svetoslavov
Posts: 11
Joined: 2013-03-11T07:08:40-07:00
Authentication code: 6789

Re: different images when using different versions of conver

Post by v.svetoslavov »

I have posted exactly the images I use - the source image is small because I generate one small image from another small image - but the third image in the first post is really the input image.

On all systems there is another imagemagick version installed. additionally, I compared the output of

Code: Select all

identify -list delegate
and it is exactly the same.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: different images when using different versions of conver

Post by fmw42 »

try this command in place of yours. perhaps there is a bug in -draw on your old version

Code: Select all

convert -size 120x120 xc:white \( source.jpg -bordercolor "#EAEAEA" -border 1x1 \) -gravity center -compose over -composite JPG:test2.jpg
or

Code: Select all

convert  source.jpg -bordercolor "#EAEAEA" -border 1x1 -gravity center -background white -extent 120x120 JPG:test3.jpg
Post Reply