Page 1 of 1

Help with resize and ">" option

Posted: 2008-05-18T10:45:40-07:00
by Skinjob
I thought the ">" option on the resize command should cause the image to be resized only if one of the dimensions exceeds the geometry spec. However, it seems that the image is always changed or at least rewritten as the file date/time stamp is always updated even if the geometry does not exceed the spec.

For example:
mogrify -resize "200x200>" folder.jpg

Initially folder.jpg is 300x300
After above command is run, size is 200x200
If above command is run again, size is still 200x200, but folder.jpg file date/time stamp is updated.

Am I not understanding how ">" is intended to work? Or am I just not using it correctly?

I'm trying to use this resize album art on my MP3 player. Most album art in my library is around 500x500. I'd like to be able to sync the player and then run a batch file that will resize any larger images down to 200x200. Any images already 200x200 or less should be left alone. Is this possible with ImageMagick?

I'm using the 6.4.1-3-Q16-windows-dll version on Windows XP SP2.

Re: Help with resize and ">" option

Posted: 2008-05-18T11:27:58-07:00
by Bonzo
From a previous post it has been noticed the image is read in to check the image dimensions and it is only resized if the criteria are met but it is saved no matter what. This means the image is not changed but the date is modified.
If you do not want this to happen you need to check if the image needs resizing using some other method first.

Re: Help with resize and ">" option

Posted: 2008-05-19T12:27:56-07:00
by Skinjob
Bonzo wrote:From a previous post it has been noticed the image is read in to check the image dimensions and it is only resized if the criteria are met but it is saved no matter what. This means the image is not changed but the date is modified.
If you do not want this to happen you need to check if the image needs resizing using some other method first.
Ah rats. I guess it's not the end of the world, just means my batch process is going to take longer. Thanks for the reply.

I didn't see the previous post you mentioned. I just searched again in the bug forum and didn't see anything. Has this been reported as a bug already or should I post it in the bug forum?

Re: Help with resize and ">" option

Posted: 2008-05-19T13:03:42-07:00
by Bonzo
I can not remember the post either; it was only in the last month or so and it came up under a different thread title - the problem was not in the title thats why you didn't see it.

From what I remember the result was the same as I told you - That you have to check the image before reading it in.

Re: Help with resize and ">" option

Posted: 2008-05-19T13:07:15-07:00
by Skinjob
Thanks again. I guess I'll post in the bug forum and see what happens. Again, it's not a huge deal, but it certainly doesn't seem like the expected behavior.