Reputation: 11
How to calculate the size of a resized image file without resizing (based on the parameters width, height and dpi)?
Example: I have image resolution is 6158x4190, dpi = 300, size = 13.2 MB. So when resized = 2939x2000, dpi = 150, the size is how much?
Will someone please help me?
Upvotes: 1
Views: 403
Reputation: 4320
It really depends on wich format you use, because of the compression and maybe impossible without really scaling it. Gif should be possible
BUT You can estimate the size So if you scale something down with a factor 0.3 you can do something like size * factor = estimation. It's not the exact size but it probably is close to it, and you should maintain the same quality and image settings. I think you should start experimenting with this.
Upvotes: 0
Reputation: 3539
DPI does not affect the file size, only the amount of pixels. Most image formats (png, jpeg) apply compression, and I don't think there's a way to calculate the final image size without actually performing the compression.
Upvotes: 1