(09-15-2011 07:50 PM)Skatman Wrote: No.. I can say "resized" in order to fit in the width & height I set (Just like the way that normal images resized in order to fit the screen).
If you mean a client side resize, you're probably stuck with a Javascript solution (which has a number of issues).
It's impossible to grab the dimensions of an
image you don't have, in other words, it would need to be fetched to the server for a width/height to be set anyway (unless you don't care about aspect ratio, in which case, things are simple, just add your width="x" height="x" properties to the <img> tag).
With Javascript, you could possibly have the big
image loaded and dynamically scale once the
image is loaded. If this is what you want, then find a Javascript script which does this sort of scaling (I suspect that they should exist) and stick it on your page. Do note the downsides of this though:
- Requires Javascript to be enabled on the client
- Loading is somewhat slower client side because it has to load the full image (as opposed to thumbnails)
- The images won't scale until they're fully loaded - combined with above, you could get a very ugly page whilst everything is loading (or user cancels loading part way through)
- Earlier versions of Firefox seem to use a nearest neighbor scaler for images, which looks really yuck
- It's just an ugly cludge thing to do...
