Resize Image To Maximum

Page: 1

Author Post
inthewayboy
Guest
I'm trying to integrate fb into my tumblr page, and everything is great with the defaults! The problem I'm running into is trying to get fb to resize to the maximum size for images while still maintaining aspect ratios. All tumblr photos resized to a 500x?, so an 1000x1200 is resized to 500x600. The only constant I have is the 500x.

I found the "height,width" options, but they don't work quite as I expected (And I see that its pointed out that it's not suggested for images). As documented it doesn't keep aspect.

Since the images are always smaller than the maximum browser area I don't think AutoResize is kicking in, cause it only goes down?

I tried using "width:750 height:150%" but that doesn't seem to work either. Help!
Administrator
Registered: Aug 2008
Posts: 3382
Sorry, I don't get it. What does "resize to the maximum size for images" mean?

If you mean that you want your 1000x1200 to display at their native resolution, and not auto-scale down to fit the screen, simply set autoSizeImages:false and remove any width and height options from the rev tag.

If you want your 1000x1200 to display as if they are 500x600, you can specify width:500 height:600. But you would be better off resizing the source images with an image editor. On the fly browser image resizing is comparatively poor quality due to the absence of dithering and smoothing techniques.

height:150% will set the height dimension to be 50% larger than the client's current browser window height.

If I haven't helped, please try to explain what you are trying to do again.
inthewayboy
Guest
hmmm...I'll have to play with the code but let me see if I can explain more clearly:

1. Tumblr allows photo uploads to their site, but resizes the photos to several sizes...500x???, 400x???, 250x???, 100x??? and 75x75 to specific.

2. On the tumblr site I have them configured to show up as the biggest there is, the 500x??? image size. This is obviously not enough to fill the whole screen.

3. Using fb I can view the image correctly, but it's still the same 500x??? size. What I was hoping for is a way for fb to show the image at the maximum size the web browser can show, while still keeping the aspect ratio.

Now I understand if this were to work it would be taking a smaller image and expanding it, which isn't the best for quality.

So for instance if the maximum viewing area in the browser is 800x600, and the image is 500x400, I was hoping for a simple way for it to crank the image resolution up to 750x600, which would be the largest the image could go while keeping the aspect ratio and keeping within the viewing area.

Kinda like the posts are the 'thumbnails' even though they are already maxed out in regards to size, and fb is the 'full-screen' viewer that is automagically fitting everything correctly.

Thanx again for the great product, even if this isn't possible it's by far the best lightbox clone I've used so far! Kudos!
Administrator
Registered: Aug 2008
Posts: 3382
Ah, I see. You want something like autoSizeImages, but that resizes smaller images UP to the max size viewable in the browser. As you mentioned, autoSizeImages only scales larger images down to fit in the browser window.

There currently is no way to set proportional height and width values, but this is on the do-list of enhancements for the next version. Currently, width and height can be set to absolute pixel values, a percentage of the available screen size, or "max" for the full screen dimension.

But width and height are set and processed independently and can't be tied together proportionally. I'm currently struggling to come up with a clean way to specify and process proportionality through the rev options. If you can wait a bit (likely less than a month) this capability will become available.
inthewayboy
Guest
Awesome! I can surely wait for a month or more...as I said, this is a minor feature missing, the rest of the package more than makes up for it! If you need any help testing out the code just let me know, would be more than happy to beta anything for ya ;)

Page: 1