Page 1 of 1
Enlarge small images
Posted: 2016-04-24T07:59:28-07:00
by danield
Hello,
I have small and large images in a folder. I need to enlarge smaller images than 1000x1000 to 1000x1000 in a folder. If there are greater images in the folder than 1000x1000 to leave them as they are without any change.
If it is possible to keep the quality of the image during the enlargement to 1000x1000 will be great. I'm using the code below where it is enlarging all the images in the folder but if I already have images 1000x1000 it is also modifying them so I prefer not to touch the already large images.
mogrify -resize '1000x1000<' *.gif
Thanks!
Re: Enlarge small images
Posted: 2016-04-24T11:26:49-07:00
by fmw42
What IM version and platform? Always provide that information, please.
I would think that your command should work. Does it work if you do a few with convert rather than mogrify.
However, any resizing will change colors. So if you have input gif images with low number of colors then, they will get larger due to having more colors after the resizing.
If you create a loop over all the images in a folder and use convert, then you can use -remap to convert the colors back to some common set of colors, if that would help. I am not sure what your situation is with your gif images.
Re: Enlarge small images
Posted: 2016-04-28T06:21:50-07:00
by danield
Thank you for replying. How can I check which version of IM I have? Sorry I'm not a programmer.
I'm basically changing jpg images. The code is working but if I already have in the folder big images the code is changing them as well. I also prefer a code if possible that doesn't impact the quality of the image so I need to modify only images less than 1000x1000.
Dan
Re: Enlarge small images
Posted: 2016-04-28T08:18:19-07:00
by snibgo
"convert -version" will give the IM version, eg "Version: ImageMagick 6.9.2-5 Q16 x64".
Your platform is Windows or Unix or whatever. This is important because different platforms expect different types of quotes.
Re: Enlarge small images
Posted: 2016-04-28T14:05:34-07:00
by danield
Will check later the version of ImageMagick. I have linux.
Re: Enlarge small images
Posted: 2016-04-29T06:44:57-07:00
by danield
Hi, my server currently utilizes 3.3.0.
Re: Enlarge small images
Posted: 2016-04-29T07:07:14-07:00
by snibgo
"3.3.0" doesn't seem a likely version of ImageMagick.
Please paste the exact output from "convert -version".