Bulk Zoom Thumbnails to Ratio script available for Firefox
mattwright
Registered Users Posts: 124 Major grins
I desire most of my galleries to have thumbnails with a 1:1 ratio, but did not want to go through and manually zoom each thumbnail. I wrote a Greasemonkey script that will zoom the thumbnails for all photos in a gallery to the specified ratio (or back to their original ratio).
You can find it at http://www.scriptarchive.com/gm_smugmug.html
I have tested it on several of my galleries, but it is still very new, so if you have any problems with it, please let me know.
Matt
You can find it at http://www.scriptarchive.com/gm_smugmug.html
I have tested it on several of my galleries, but it is still very new, so if you have any problems with it, please let me know.
Matt
0
Comments
I know it's a problem with multiple pages, but I wish these types of utilities could work with the smugmug layout, it would eliminate all the switching settings back and forth.
Nikon D300
Nikon 70-200mm f/2.8
Nikon 18-200mm f/3.5-5.6
Nikon 50mm f/1.8D
[SIZE=-3]Mary Beth Glasmann Photography[/SIZE]
FYI, the reason I disabled it for the smugmug layout is that the list of images embedded in the JavaScript source for that page contains images that aren't actually viewable, so it wouldn't be obvious which images you were zooming necessarily.
Nice! Correct me if I'm wrong, but it appears that your code still requires one to navigate to each individual image page? The tool I wrote allows you to change an entire gallery with one click, although you will have to let it run in the browser for a little bit while it does its work.
Matt
It normally takes a few seconds per photo, but this still beats having to navigate to each page manually and crop the photo. Sometimes if smugmug's servers are slow, it can take longer. Is it going a lot slower than that for you?
I went to the Firefox site and downloaded the Greasemonkey extension, but I can't figure out how to install it. I get this error message:
"Windows cannot open this file: To open this file, Windows needs to know what program created it" and asks to luse the web service to find the appropriate program.
What am I doing wrong?
under the tools menu at the top.
My Website index | My Blog
No install now botton.
https://addons.mozilla.org/en-US/firefox/addon/748
My Website index | My Blog
Yes, and it pops up a new window saying file type unknown. I also downloaded and clicked on downloaded file and I get the same message.
Who knows??
Then you should just be able to click the Install Now button and an install dialog would popup, as a previous poster mentioned. I don't see why a recent version of Firefox would be giving you a file type unknown error.
Matt
Sorry, but thanks for helping.
What a time saver and it works so fast. I started a 400 image gallery about 10 minutes ago and it's already 1/4 of the way through.
Thanks for doing this...
Although it does center the thumbnail, as you say, that works for most images and then you can go in and manually zoom the thumbnail for those where a different crop works best. I wanted a way to quickly zoom all images to 1:1 for new galleries I added and then manually zoom those specific images where it was needed.
Glad it did eventually work even though it didn't appear to! It is possible that the callback for when the zoom is completed failed on the pages being returned by smugmug to the script (the script looks for a specific string: "/cart/batchadd.mg?ImageID=##")
As a general rule, once a box has turned yellow, the request for zooming that thumbnail has been sent to smugmug and should be completed several seconds later. If you see all boxes turn yellow, I guess there is some completion detection failure, but most likely the zooms have all been processed.
Matt
Personally I find this greasemonkey script works better than the "bulk zoom thumbnail" hack that can be found on this tread:
http://www.dgrin.com/showthread.php?t=26959
Thanks. Now if only SmugMug would incorporate something like this into their uploader procedure.
Facebook ♦ Flickr ♦ SmugMug
SmugMug referral coupon code: ix3uDyfBU6xXs
(use this for a discount off your SmugMug subscription)
I really hate it when I have vertical photos and everyone's heads get cut-off in the zoomed thumbanil, which then means manually changing each photo.
Thanks.
Facebook ♦ Flickr ♦ SmugMug
SmugMug referral coupon code: ix3uDyfBU6xXs
(use this for a discount off your SmugMug subscription)
Hi jchin,
Currently it doesn't do that, but it could be modified to do so. I haven't tested this modification, but feel free to try it out yourself. In the function unsafeWindow.processImageDetails you will see a line that looks like:
yOffset = parseInt((imgHeight - newHeight) / 2);
Change this to:
yOffset = 0;
The original line is setting the starting vertical offset of the new crop area to be 1/2 of what is being removed from the image (therefore centering it), but the change will simply keep the crop at the top of the image.
Matt
Thanks Matt. I'll give that a try.
Does this affect the horizontal photos?
Facebook ♦ Flickr ♦ SmugMug
SmugMug referral coupon code: ix3uDyfBU6xXs
(use this for a discount off your SmugMug subscription)
if (imgWidth / ratio_w < imgHeight / ratio_h) {
which basically will only effect images where the width is less than the height.
Matt
Thanks a very large bunch!
Instead of using:
yOffset = 0;
I used, instead:
yOffset = parseInt((imgHeight - newHeight) / 4);
And on my test gallery, it worked wonderfully.
Thanks a bunch!
Merry Christmas!
- Johnny
Facebook ♦ Flickr ♦ SmugMug
SmugMug referral coupon code: ix3uDyfBU6xXs
(use this for a discount off your SmugMug subscription)
Using FF 2.0.0.11, greasemonkey installed and enabled. Your script installed. I can right click, and select it. But it never does anything.
I even made it private, turned originals on and protection off. Same thing.
Any ideas? ETA: I did turn popups on first and set to all thumbs.
Galleries here Upcoming Ranch/Horse Workshop
HI Matt,
I installed your script but I can't get the 'User script Command' enabled
so have no chance to run it.
Greasemonkey and 'Smugmug: Bulk Zoom...' are enabled.
Gallery style in smugmug: all thumbs
Any ideas?
Thanks a lot!
Michael
FF 2.0.0.11
greasemonkey-0.7.20070607.0-fx.xpi
WIN XP
Did you try restarting Firefox?
Facebook ♦ Flickr ♦ SmugMug
SmugMug referral coupon code: ix3uDyfBU6xXs
(use this for a discount off your SmugMug subscription)
Thanks,
Michael
I was successfully using this greasemonkey script for quite a while but when I tried yesterday it just sits there with a grid of grey boxes and nothing changes color.
I updated my Mac OS to Leopard recently, and I don't know if FF has been updated... those are the only things I can think of that would be different but why would that effect something that works from within the browser?
Any thoughts?
Jason Scott Photography | Blog | FB | Twitter | Google+ | Tumblr | Instagram | YouTube