Forum Moderators: not2easy
I then tried a 100w x 100h image and used tags like-
<IMG SRC="test.jpg" WIDTH="200">
to double the size of the image
<IMG SRC="test.jpg" WIDTH="50">
to half the size of it.
Then tried HEIGHT= (without "WIDTH=" marked up), and other combination. I'm using MS-IE 5.5 and it worked fine.
So long as I didn't put both parameters in it properly scaled the image. I should note that using
<IMG SRC="test.jpg" WIDTH="200" HEIGHT="">
results in the height being set to '0' and the image is not displayed, but omit height and it scales...
I'm wondering if this is a documented JPG/GIF HTML or browser feature or just a fluke... it sure makes scaling a batch of images to the same width or height simple --- no math, just give it one parameter/value and it scales.
(I do know it's not scaling the actual image file, just altering the appearance in the browser).
Anyone ever used this or avoided it for some reason?
Cross-browser comments?
I'm no newbie.. I understand graphic image files and the proper way to scale an image.
The HTML was output from one of my Perl scripts. The script manages an image database. To accomplish the scaling the "proper way" I'd either need to upload a thumbnail of every image, or load Perl modules (like Image:Magik) to accomplish it on the fly. That would make lots of extra files and/or lots of extra server processing.
I need to scale the images to a certain width regardless of height... this just did it very neatly.
If this "stupid HTML trick" will work accros a broad range of browsers it would accomplish a few things:
1). no server image file manipulation
2). no additional files (thumbnails) needed
3). no need to load non-standard Perl modules
I am more interested in cross-browser compatability for this than suggestions for other ways to scale images.
Feedback from anyone who trys this and can tell me if it worked and on what browser/platform/version would be appreciated.