Is there a tool that allows me to edit a picture so that it has an exact file size?

3

2

For various reasons I want to scale down a couple of images so that they have a specific file size. I want to convert gif, tiff and jpeg files.

Is there any tool that allows me to do that with a batch?

RoflcoptrException

Posted 2012-06-19T19:04:00.727

Reputation: 1 355

You can do this with GIMP or Photoshop quite easily, just Google batch resize with either program name. – Breakthrough – 2012-06-19T19:07:35.447

I can find tutorials that show me how to batch process images to resize based on image resolution. But I can't find an explanation on how I can do that based on image file size. – RoflcoptrException – 2012-06-19T19:37:03.897

You might take a look at ImageMagick for accomplishing this, it is a powerful tool with many features. – jmreicha – 2012-06-19T20:52:00.610

How specific do you want the file size to be? Down to the byte? Kilobyte? You could probably do it with a script and ImageMagick - compress, check file-size, compress more or less depending on how much bigger or smaller than the target it is, repeat until close enough.. – Blorgbeard is out – 2012-06-19T22:52:34.400

Answers

1

In GIMP when you save a JPG, you can preview the output as you play with the compression level and it estimates the output file size. I believe this is the closest to what you're looking for. And I believe it only does this for JPGs.

Chris K

Posted 2012-06-19T19:04:00.727

Reputation: 923

0

There is also IrfanView which is a free download that would allow you to batch resize. Download Here.

OZ_

Posted 2012-06-19T19:04:00.727

Reputation: 11

0

In spite of being a late response, hopefully my answer will benefit some.

You can do exactly what you want with Batch Images: http://www.binarymark.com/products/batchimages/default.aspx

Step 1: Add images however you want (all files in folder, by searching for specific files, etc.) Add images

Step 2: Actually called step 3 in the program is where you specify the desired out file names, image file format, and most importantly target file size (which is what you want): Output settings

As you can see there is a "Resize to fit" option (under File size) where you specify the file size. Under advanced options the program offers additional tweaks: additional options

Here you can specify how close you want the size to be matched (it cannot be exactly the size you specify to the byte, because of image format limitations and other reasons that have to do with information compression). You can also specify resampling algorithm used which affects quality / sharpness at the expense of the resulting dimensions: the sharper the image the more bytes it needs per given number of pixels, but because the final file size is constrained, it ultimately results in image being shrunk dimension-wise even more.

Disclaimer: I am using a paid version of this product, and have actually used this feature on many occasions, and most of the time the results are very closed to the specified file size.

George

Posted 2012-06-19T19:04:00.727

Reputation: 282