Jump to content


Photo

Image size calculations are incorrect


This is a repeat bug.. I can't find it now, I know i've reported it before, but likely back on a WAY previous version.

Set your original image size to something like 100x100

Upload an image that is significantly larger than that..

The file_size for the image is the original file size.. Not the size of the image after it has been resized.

So.. I set my original image size to 800x600.. I uploaded an image that was 2000x1500 or so, and was 721k

That image is resized by gallery to 100x100 (maximum) and has a filesize of about 64k

However, in the database, the gallery_images table has the filesize set to 721k, the PRE-resize size of the image.

So, users are being 'charged' for more space than they're actually using.

A good example of this.. http://screencast.com/t/rQbsYfQkShql

That entry shows the file being approximately 6M.. That's what the gallery stats are calculated by, that's what the user limits are calculated by.. However, if you look at the actual image on disk..

http://screencast.com/t/GJ9c8283S

That image is only using 173k.. A difference of about 5.9M in the gallery stats, and in what the user is allowed to upload.

Status: Fixed
Version: 4.2.1
Fixed In: 5.0.0 Beta 1


2 Comments

I remember reading a bug report about this, not sure if it's still open or fixed for 4.2.2 thought. I'll confirm it for now.
Updating Fixed In to: 5.0.0 Beta 1
Updating Status to: Fixed

-