GNOME Bugzilla – Bug 507228
Image size calculation for dragged images is wrong
Last modified: 2012-10-04 01:21:20 UTC
Flickr cares about the file size of the uploaded data, not the resulting uncompressed image size. So, when an image is dragged to postr, it should straight away encode to a PNG and determine the file size, instead of converting when uploading.
I was trying to figure out when it could happen. I am documenting the steps just in case a voluntary would like to work in this bug. When using drag & drop from Nautilus to Postr, Postr receives an URI; which works ok. However, when using Gimp is possible to drag from the layer toolbox and drop on Postr. In such case, Postr will receive an (uncompressed) Image not an URI. The file size may be 2.2MB, but the uncompressed file may be 20MB. Postr will transfer a file throught HTTP. Hence, in the previous example, the right size if 2.2MB not 20MB.
On the other hand, the file size is checked on ::add_image_filename(). In the case described in this bug (targetType == ImageList.DRAG_IMAGE) it is never checked. I do think this is not a common use case.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.