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!
Enlarge small images
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Enlarge small images
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.
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
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
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
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Enlarge small images
"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.
Your platform is Windows or Unix or whatever. This is important because different platforms expect different types of quotes.
snibgo's IM pages: im.snibgo.com
Re: Enlarge small images
Will check later the version of ImageMagick. I have linux.
Re: Enlarge small images
Hi, my server currently utilizes 3.3.0.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Enlarge small images
"3.3.0" doesn't seem a likely version of ImageMagick.
Please paste the exact output from "convert -version".
Please paste the exact output from "convert -version".
snibgo's IM pages: im.snibgo.com