[GRANTED] Toggle for Zoom to Fill

Features wanted...
klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

[GRANTED] Toggle for Zoom to Fill

Post 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.
Last edited by klownboy on 23 Feb 2016 11:26, edited 2 times in total.

admin
Site Admin
Posts: 67020
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Toogle for Zoom to Fill

Post 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)

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Toogle for Zoom to Fill

Post 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.

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Toogle for Zoom to Fill

Post by klownboy »

Thanks Don for new SC ThumbsConf. Now when I get some time I'll work on getting the Thumbnail Maintenance script working properly on Zoom to Fill thumbnails when both types (Zoom and no zoom) exists in the cache database. I should be able to use gettoken/substr on the dat2 file to determine if the 'z' is present since I'm already breaking down the dat2 file for thumbnail size and folder. Gallery mode should be easy now without having start a new instance of XY with a different ini. :tup: :appl: :beer:

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Toogle for Zoom to Fill

Post 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.

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Toogle for Zoom to Fill

Post 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.

admin
Site Admin
Posts: 67020
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Toogle for Zoom to Fill

Post by admin »

Yes:

Code: Select all

thumbsconf(",!"); //just toggle ZoomToFill

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Toogle for Zoom to Fill

Post 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'}
Last edited by klownboy on 23 Feb 2016 21:36, edited 1 time in total.

admin
Site Admin
Posts: 67020
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Toogle for Zoom to Fill

Post by admin »

Yep.

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Toogle for Zoom to Fill

Post 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.... :)
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 67020
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Toggle for Zoom to Fill

Post by admin »

Yep, it's an idea for later.

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: [GRANTED] Toggle for Zoom to Fill

Post 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.

admin
Site Admin
Posts: 67020
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [GRANTED] Toggle for Zoom to Fill

Post by admin »

Unfortunately not that easy to do. After 16.30 maybe...

klownboy
Posts: 4477
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: [GRANTED] Toggle for Zoom to Fill

Post 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.

admin
Site Admin
Posts: 67020
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [GRANTED] Toggle for Zoom to Fill

Post 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.

Post Reply