On 31/08/2007, aaron@svn.wikimedia.org aaron@svn.wikimedia.org wrote:
Revision: 25341 Author: aaron Date: 2007-08-31 08:57:22 +0000 (Fri, 31 Aug 2007)
Log Message:
*Call OutputPageBeforeHTML on preview (bug 7050)
The name of this hook implies that the OutputPage class should be calling it, perhaps during the send() method, for all page views. If that's not the case, then the hook ought to be deprecated in favour of a more accurate name.
Rob Church
Hi,
I know how to check the archives, but I'm not sure if this would even be there. What I am really curious about is why it was decided to go with using ImageMagick to resize images, rather than just changing the width attribute of the image?
Thanks, -Courtney
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Christensen, Courtney wrote:
I know how to check the archives, but I'm not sure if this would even be there. What I am really curious about is why it was decided to go with using ImageMagick to resize images, rather than just changing the width attribute of the image?
I don't know if you'll find a specific message in the archive, but the reasoning is pretty much this:
1) Many browsers do really ugly in-browser resizing; a resampled image usually looks better.
2) Many of our pictures are much larger than comfortable in-browser thumbnail sizes; a resized image file usually is smaller, so it downloads faster and saves us bandwidth, and therefore money.
A multi-megapixel digital camera image or high-resolution scan can run several megabytes, whereas a nice thumbnail might be 70-150 kilobytes.
As for choosing ImageMagick specifically; it was available, free, and did the job. :) Using a separate process also has advantages in that failures or out-of-memory conditions can be contained more easily.
- -- brion vibber (brion @ wikimedia.org)
On 9/4/07, Christensen, Courtney ChristensenC@battelle.org wrote:
Hi,
I know how to check the archives, but I'm not sure if this would even be there. What I am really curious about is why it was decided to go with using ImageMagick to resize images, rather than just changing the width attribute of the image?
Without knowing when or where this was decided, I am fairly certain that it is because of size. Setting the html size attribute would still require you to download the full X megabytes of the picture, while a thumb only takes several kilobytes.
Bryan
Thanks, -Courtney
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 9/4/07, Christensen, Courtney ChristensenC@battelle.org wrote:
I know how to check the archives, but I'm not sure if this would even be there. What I am really curious about is why it was decided to go with using ImageMagick to resize images, rather than just changing the width attribute of the image?
This decision probably predates the existence of this mailing list, and it probably wouldn't have been discussed anyway. As source images can be significantly larger than the displayed image - editors often upload raw digital camera output, for example - using the width attribute would seriously inconvenience both the user (who would have to download the full-size image) and Wikimedia (who would have to provide bandwidth for these downloads). Quite honestly, there's almost never a good reason to set a width/height attribute different from the image's actual dimensions.
zetawoof wrote:
This decision probably predates the existence of this mailing list, and it probably wouldn't have been discussed anyway. As source images can be significantly larger than the displayed image - editors often upload raw digital camera output, for example - using the width attribute would seriously inconvenience both the user (who would have to download the full-size image) and Wikimedia (who would have to provide bandwidth for these downloads). Quite honestly, there's almost never a good reason to set a width/height attribute different from the image's actual dimensions.
And people was uploading the images repeated in low-resolution to cope with it.
Christensen, Courtney wrote:
Hi,
I know how to check the archives, but I'm not sure if this would even be there. What I am really curious about is why it was decided to go with using ImageMagick to resize images, rather than just changing the width attribute of the image?
Thanks, -Courtney
If I recall correctly, two reasons:
* resizing the image at the server side makes for a much smaller image file, reducing bandwidth costs and server load, and decreasing page load times proportionately (consider, for example, a 1000x1000 image reduced to a 200 x 200 thumbnail, which will load 25x faster than the original at the same compression ratio)
* most browsers do a very poor job of resizing images, generally using simple pixel selection, and ImageMagick can do a much better job
-- Neil
I think I got more answers to this curiosity question than some of my technical ones! Thank you all very much for your answers. I appreciate the willingness of list members to share, and I love it when there is a question even I can answer.
Thanks again! -Courtney
-----Original Message----- From: wikitech-l-bounces@lists.wikimedia.org [mailto:wikitech-l-bounces@lists.wikimedia.org] On Behalf Of Neil Harris Sent: Tuesday, September 04, 2007 2:54 PM To: Wikimedia developers Subject: Re: [Wikitech-l] Where can I find old discussions on mediawikiprogramming choices?
Christensen, Courtney wrote:
Hi,
I know how to check the archives, but I'm not sure if this would even
be
there. What I am really curious about is why it was decided to go
with
using ImageMagick to resize images, rather than just changing the
width
attribute of the image?
Thanks, -Courtney
If I recall correctly, two reasons:
* resizing the image at the server side makes for a much smaller image file, reducing bandwidth costs and server load, and decreasing page load
times proportionately (consider, for example, a 1000x1000 image reduced to a 200 x 200 thumbnail, which will load 25x faster than the original at the same compression ratio)
* most browsers do a very poor job of resizing images, generally using simple pixel selection, and ImageMagick can do a much better job
-- Neil
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org