Page 1 of 2
[GRANTED] Toggle for Zoom to Fill
Posted: 17 Feb 2016 13:16
by klownboy
Initially I thought the Thumbnail Maintenance script was working after the addition of the 'z' designator to indicate Zoom to Fill thumbnails, but I was wrong, I hadn't tested enough. It turns out to rebuild the thumbnail caches with Zoom to Fill, I'd need to be able to turn the setting on and off on the fly. Don, would it be possible to get a #CID or SC setting to toggle Zoom-to-Fill?
You may be thinking I want it to get a little closer to scripting a so called "gallery mode" we were talking about a month ago, but no not at this time. It's needed to get the Thumbnail Maintenance script working if a user has Zoom-to-Fill thumbnail caches since the setting has to be toggled on the fly to rebuild depending on whether Zoom to Fill is on or off and the cache is Zoom to Fill or not. A user may have thumbnails for example in 240x240 and 240x240z. Yes, it would indeed get closer to being able to script a gallery mode, but we'd still need to toggle or set padding, border and caption as well. Thanks.
Re: Toogle for Zoom to Fill
Posted: 20 Feb 2016 09:10
by admin
OK, I'll add it to SC setting/settingp.
Or would this be the better solution?
Code: Select all
ThumbsStyle BorderStyle, Padding, ShowCaption, ZoomToFill
(missing arguments would leave the current values untouched)
(it could also return the current/old values as a comma-separated list)
Re: Toogle for Zoom to Fill
Posted: 20 Feb 2016 13:43
by klownboy
As I just mentioned in the "ThumbnailViewerGallery" thread, having an SC thumbsStyle would totally solve my issues with getting the Thumbnail Maintenance script functional with Zoom to Fill. And that's exactly what I was hoping when I remembered your idea of an ThumbsStyle last night.(i.e., if an argument was left blank there would be no change to it's existing value). Yes, SC ThumbsStyle is definitely the way to go. Thanks.
Re: Toogle for Zoom to Fill
Posted: 20 Feb 2016 22:31
by klownboy
Re: Toogle for Zoom to Fill
Posted: 21 Feb 2016 14:46
by klownboy
Hi Don, can you cycle the Zoom to Fill with the new SC thumbsconf? Captions cycle properly with thumbsconf("!"); but not Zoom to Fill. I've tried thumbsconf(,"!"). I even tried direct Boolean thumbsconf(,"0"); and that doesn't work to turn Zoom to Fill off. I don't believe Zoom to Fill is working in either direction - on or off. It does still work from the right click view menu. If it matters, I'm running one liners from the Run Scripts... menu. Thanks.
Re: Toogle for Zoom to Fill
Posted: 21 Feb 2016 15:11
by klownboy
Sorry, it looks like the format or syntax has to be with quotes around all 4 parameters (or whatever is provided) as a whole not each individually. So thumbsconf("0,1"); or thumbsconf("1,0"); works, but thumbsconf("0","1"); does not. All your examples reflect the correct way and I hadn't caught on. Thanks.
Re: Toogle for Zoom to Fill
Posted: 21 Feb 2016 15:28
by admin
Yes:
Code: Select all
thumbsconf(",!"); //just toggle ZoomToFill
Re: Toogle for Zoom to Fill
Posted: 21 Feb 2016 15:37
by klownboy
Thanks Don, I noticed the changes made via SC ThumbsConf are immediately seen in the view menu and in the Configuration dialog, but not immediate in the ini file which is typical until a save. For that reason, if for whatever reason we want to check the state of "Zoom to Fill" and take specific action based on the state, as opposed to simply toggling, is it best to use SC ThumbsConf() and break it down? Thanks.
Code: Select all
if(gettoken(thumbsconf(),"2",",") == "0") { // if Zoom to Fill is off
thumbsconf("0,1,0,0");} //turn Zoom to Fill and set padding to '0'
else {thumbsconf("1,0,0,1");} //turn Zoom to fill off and set padding to '1'}
Re: Toogle for Zoom to Fill
Posted: 21 Feb 2016 15:48
by admin
Yep.
Re: Toogle for Zoom to Fill
Posted: 22 Feb 2016 19:01
by klownboy
Just a thought Don...you mentioned, probably in another thread, that maybe one day you could add the capability to have Zoom to Fill an attribute changeable per tab (or maybe as a FVS). One use for Zoom to Fill which I think many users would fine really great would be to be able to use it on
folders even when the sub folders themselves under that view are not in Zoom to Fill. Let's face it, folders can look a bit ugly depending on the thumbnails within them. A picture's worth a thousand words...
Folders in Non Zoom to Fill.JPG
Same Folders in Zoom to Fill mode.JPG
Yeah, you could save a "folder.jpg" file for each of the many subfolders that was in a full Zoom to Fill type picture, but besides being a pain in the xxx, it would be nice if it was done automatically. How much nicer is it to see the folders in the Zoom to Fill mode regardless of how the images themselves in the sub folders are displayed. Something to consider....

Re: Toggle for Zoom to Fill
Posted: 23 Feb 2016 09:30
by admin
Yep, it's an idea for later.
Re: [GRANTED] Toggle for Zoom to Fill
Posted: 23 Feb 2016 12:53
by klownboy
Thanks Don. I was thinking yesterday that even without the above wish, I could automate the process in a script by creating a folder.jpg file for each and every subfolder, but in looking at it closer this morning, I realized it can't be done via XYplorer alone. I figured I might be able to use SC savethumb, but images generated with that command are not only proportional but also in the same aspect ratio of the original image. Of course being in the original aspect ratio defeats the purpose. Would you be able to apply a 'Zoom to Fill' type parameter to SC savethumb like the thumbnails which would maintain the resultant image as proportional but fill the specified dimensions for example 240x240? I know I'm pushing my luck, but it would fit in with other image options for thumbnails. Thanks.
Re: [GRANTED] Toggle for Zoom to Fill
Posted: 23 Feb 2016 13:17
by admin
Unfortunately not that easy to do. After 16.30 maybe...
Re: [GRANTED] Toggle for Zoom to Fill
Posted: 23 Feb 2016 14:04
by klownboy
Thanks Don for considering. I thought you might be able to use the similar code or algorithms used for Zoom to Fill thumbnails.
Re: [GRANTED] Toggle for Zoom to Fill
Posted: 23 Feb 2016 14:12
by admin
Sure, it's totally possible, but in this case I cannot just squeeze it in on the fly. These areas are highly optimized which generally means the code is harder to manage. A price I'm willing to pay, of course, for being and staying the fastest file manager in the world.