Re-sizing to a given file size

Yellowbelly

Suspended / Banned
Messages
1,548
Name
Bob
Edit My Images
No
Maybe a dumb question, but I'm not proud! ;)

Is there a way in PSE 9 or Canon DPP to re-size an image to a given file size? At present, all I can do is re-size to a number of differing pixel settings and then choose the image nearest my intended file size.

Assistance would be much appreciated.
 
If you're talking about a compressed file type such as JPEG, then no, not really. Even if you knew the maths that went into the compression algorithm, it would be difficult to predict exactly how large the resulting file would be. With uncompressed file types you could resize it to a given number of pixels wide and deep then if you knew how many bytes were stored per pixel and how big the file header size is then it's possible but hardly worth it.

TLDR: No, not really.

Edit: OK, maybe I shouldn't have assumed you meant an exact size... :)
 
Last edited:
There is only one way to do it in PSE9 and that is using the save for web feature.

1-open your image in save for web.

2-set to jpeg and in the new size box set your pixels, here I set it at 800px high.

3-click on the little arrow next to the pre-set box and choose Optimize to File Size.

4- in the new dialogue box set your file size.

As you can see its not exact but 197kb is close to the 200kb I set.

139925753.jpg
 
As in 400kBytes as opposed to 3000x2000? If so, there is normally a filesize if you export it to web (at least it is on Photoshop). You will have to vary the compression ratio. The smaller you want it, the more it has to compress and lose quality. You should resize in pixels first though - halving in x and y means you have a quarter of the data to save so you can compress less...
 
Many thanks to you all for responding so quickly, and to Paul particularly for solving my problem at a stroke.

I reckon between you, you have saved me hours of work. :thumbs:
 
I think even if you "Save as" then select JPG from the dropdown, you then get a compression dialog come up which will give a file size indication on it. I think this way it keeps the EXIF data which you may or may not want.
 
I think even if you "Save as" then select JPG from the dropdown, you then get a compression dialog come up which will give a file size indication on it. I think this way it keeps the EXIF data which you may or may not want.

Thanks Keith. I had not realised it was possible to do this, but I would like the EXIF removed anyway. :)
 
Back
Top