Shop Mobile More Submit  Join Login
DeviantART PhotoAlbum II by compass-uk DeviantART PhotoAlbum II by compass-uk
I liked the look of Samy's DeviantART PhotoAlbum widget ( [link] ) but it resized and cropped the images to fit the size of the widget as you set it.

As I wanted to see the whole image in the PhotoAlbum all the time, I initially tweaked the image parameter to "Image fit size" rather than "Image fit size and full", but sometimes the image ended up too small.

So I added some additional javascript to process the image size, and a couple of new menu items so now the widget resizes itself to suit the image it is currently displaying.

All the original functions are maintained;
Double click to next photo.
Right click to change folder or set photo album settings.
Drag right-bottom corner to resize.

The two additional menu items are Constrain Horizontal and Constrain Vertical. After you resize the widget to the desired size, these menu options prevent the widget from enlarging in the constrained aspect; for instant, Constrain Vertical (the default setting) means that when resizing, it can only do so horizontally as the vertical aspect is constrained.

To retrieve the image dimensions, I added these to the image name via a file renaming utility (I use RenameMaster). Each image has it's dimension in braces separated by a comma, so an image that was 900 by 600 pixels would have "{900,600}" as part of it's filename.
There may be a way to do this without adding the dimensions to the filename, but not yet.

Without image size values on the filename, the widget just fits the image into it's current size.
pigboat Featured By Owner May 1, 2012  Hobbyist Interface Designer
compass-uk Featured By Owner May 1, 2012
Thanks. It was an interesting exercise which is almost complete.
Add a Comment:


Submitted on
April 28, 2012
File Size
23.5 KB
Submitted with


2 (who?)