[NTLUG:Discuss] shrink images globally
MadHat
madhat at unspecific.com
Sat Dec 4 11:00:29 CST 2004
On Dec 3, 2004, at 7:42 PM, Paul Ingendorf wrote:
> Easy way to do this is using Image Magik. You can create a list of
> files or
> if you want all the files in a directory to be changed to a specific
> size
> use the following
>
> for imageFile in *
> do
> mogrify -antialias -scale 512x348 $imageFile
> done
Don't need to do it that way..
http://www.imagemagick.org/www/mogrify.html
"To convert a directory full of JPEG images to thumbnails, use:
mogrify -size 120x120 -resize 120x120 +profile "*" *.jpg
In this example, '-size 120x120' gives a hint to the JPEG decoder that
the images are going to be downscaled to 120x120, allowing it to run
faster by avoiding returning full-resolution images to ImageMagick for
the subsequent resizing operation. The '-resize 120x120' specifies the
desired dimensions of the output images. It will be scaled so its
largest dimension is 120 pixels. The '+profile "*"' removes any ICM,
EXIF, IPTC, or other profiles that might be present in the input and
aren't needed in the thumbnails."
>
> I use mogrify because it allows a lot more manipulation than just
> scaling
> and image format manipulation. You could just as easily substitute
> convert
> while retaining the flags. Also the image you are working on will be
> modified and the old info in that file will be lost so use with care.
>
> -----Original Message-----
> From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org]On
> Behalf Of Terry Henderson
> Sent: Friday, December 03, 2004 6:19 PM
> To: NTLUG Discussion List
> Subject: [NTLUG:Discuss] shrink images globally
>
>
> I sometimes find the need to resize a whole directory of images to a
> certain size and would like to learn some efficient way to do it
> globally. I use gimp, but it's several mouse clicks and you manually
> enter pixel sizes each time for each image and if there are 20 or 30
> images, well, you can imagine, it's time consuming.
> I'm usually wanting to make them smaller and all the same size.
> convert -size 512x348 *
> works well, but what you end up with is all of the originals
> untouched, and a whole new set of resized files with new names like,
> [assume we have just 4 files, p0001.jpg - p0004.jpg] p0004.jpg.0
> p0004.jpg.1 p0004.jpg.2 p0004.jpg.3 When, what I'd rather do is just
> overwrite with same 'ol filenames as before. Or just something
> besides adding .1 .2 .3 etc. to end of files, like p00040.jpg
> p00041.jpg p00042.jpg p00043.jpg Or just simply overwrite all and
> leave them all same filenames, but just smaller images.
>
> I can use command:
> convert -size 512x348 * +profile '*' smaller.jpg
> and that just gives me: smaller.jpg.0 smaller.jpg.1 smaller.jpg.2
> smaller.jpg.3
> Sounds so simple, but just don't see any way to do what I really want
> to do.
> Am I just using the wrong application? or?
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
>
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list