Last modified: 2010-05-15 16:02:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14974 - thumbnail larger than original image
thumbnail larger than original image
Status: RESOLVED DUPLICATE of bug 1218
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.13.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-29 20:55 UTC by Rene Bakker
Modified: 2010-05-15 16:02 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rene Bakker 2008-07-29 20:55:21 UTC
When a monochrome or web optimized bitmap image (like .PNG) is thumbnailed using ImageMagick or GD the size is larger than the original. The size is even about 6 times larger than it could/should be. Usually the disksize is not a problem, but the bandwidth for dail up connections is. And my monthly site bandwidth is limited. Thumbnails should be smaller than the original. 

The thumbnails are created by GD using the function imagecreatetruecolor(...) to create a blank new image in which the thumbnail is created. So the destination image is a true color image which is therefor larger than the source. When imagecreate(...) is used for the non true color images these thumbnails are much smaller.
The following code in media/Bitmap.php at about line 170 does this.

			if (imageistruecolor( $src_image ) ) {
				$dst_image = imagecreatetruecolor( $physicalWidth, $physicalHeight );
			}
			else {
				$dst_image = imagecreate( $physicalWidth, $physicalHeight );
			}

ImageMagick using the -depth 8 option also creates a full color image from the source. 
I have not found a solution for this yet.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-07-29 21:09:44 UTC

*** This bug has been marked as a duplicate of bug 1218 ***
Comment 2 Rene Bakker 2008-07-29 21:15:37 UTC
It is not completely a duplicate of bug 1218, since that bug is all about ImageMagick and I suggest a fix for the same problem when GD is used and not ImageMagick.
I should not have mentioned ImageMagick.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-07-29 21:23:08 UTC
Bug 1218 covers GD too.  Discussion might be focused on ImageMagick because that's what Wikipedia uses, but that doesn't restrict the bug's focus.  It's more or less the same underlying issue, it seems: you have to figure out how to deal with the increase in color depth due to interpolation.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links