Thumbnail resizes images down to a maximum of 10,000 pixels (equivalent to
a 100x100 image), so that each thumbnail has the same amount of detail,
reguardless of its dimesions. Requires
ImageMagick.
Download thumbnail.
View examples.
The guts:
$newx = int($x / (sqrt($x * $y) / sqrt($pixelcount)));
$newy = int($y / (sqrt($x * $y) / sqrt($pixelcount)));
If this inspires you to use a similar calculation for resizing images,
please consider giving me credit.
In my opinion, the functionality of this script ought to be implemented as a
commandline option within the program
convert (part of
ImageMagick). Something like:
convert --pixels 10000 original.jpg thumbnail.jpg
"Added
@ to the image geometry specification. Use it to specify the
square-root of the maximum area in pixels of an image (suggested by
Darxus@ChaosReigns.com)." -
cristy@mystic.es.dupont.com,
imagemagick developer, Thu, 2 Aug 2001 12:35:39 -0400 (EDT).
Woohoo ! I've succeded in getting my thumbnail script obsoleted !! :)
Thanks to Leonard Rosenthol for
relaying this request.
Comment on this page.
Return to Darxus' Code Index
Return to Darxus' Home Page
Wed Jun 27 14:23:52 EDT 2001