jasper-software / xv

XV Software
Other
26 stars 9 forks source link

Larger icons and default size for Visual Schnauzer #11

Closed antofthy closed 1 month ago

antofthy commented 1 year ago

A LONG time ago (2002) I modified xv v3.10a, with Greg's XV Jumbo Patch to create a larger thumbnail size, to better browse the images on the larger modern displays.

Part of this was to set up the defines so as to calculate the size of the Visual Schnauzer window.

The changes needed was detailed in a text file that remains online... https://antofthy.gitlab.io/info/graphics/xv_mods.txt

Looking at the code, I can see that my changes from so long ago has been included into your version, but it still defaults to the original and very small thumbnail size of 80 x 60 pixels.

I would love to see these defaults updated to use larger thumbnail. Or command line options to have xv use larger thumbnails.

mdadams commented 1 year ago

Do you happen to have a screenshot that you can attach showing the effect of the changes that you are proposing? I am not sure what you are changing the size of.

tanabi commented 1 year ago

@mdadams If you hit 'ctrl-v' in the xv viewer window, it will bring up the "visual schnauzer" which is a filesystem browser that can generate thumbnails of your images. Those are the thumbnails/icons he's talking about.

It's surprisingly ahead of its time, I still find it more useful than the modern stuff sometimes :)

That said, personally, I would not like the thumbnails bigger -- I appreciate that I can see a zillion of them at once on my big screen. For me, personally, that is a feature.

So that means that if we're doing this one, we should probably make it an option. xv doesn't have any kind of configuration file, but I believe it can use xresources, so we could either add a large icon boolean or perhaps even let people indicate their own width/height parameters.

I just reviewed the text file linked by the OP and I'm pretty sure making the icon size variable would be fairly trivial. I might take a whack at this one if nobody else wants to ...

mdadams commented 1 year ago

@tanabi Thank you for the clarification.

In this regard, I would agree that this functionality should be controlled by a command-line option, since some people may prefer the old behavior and some people may also have the misfortune of using a lower-resolution device. I would suggest that the width and height of the thumbnails could default to the old size but could be overridden by a width and height specified via a command line option. If anyone would like to make the necessary changes in a pull request, this would be fine with me. I don't have time to make the changes myself, however.

mdadams commented 3 months ago

@antofthy This issue appears to overlap with the addition of basic HiDPI support. Since basic HiDPI support has now been added, I am closing this issue.

antofthy commented 3 months ago

Sorry... this does NOT overlap...

Downloaded and compiled XV - version 6.0.0-20240812

From what I have been able to determine HiDPI support allows you to double or triple the size of images, icons, text. And only mentioned in NEWS. It is not in the normal documentation, or in the -help output of "xv". So unless people are closely following source users won't know about it.

When I used -hidpi or -dpimult I get huge fonts in the "visual schnauzer" though some Icons and images still appear at the normal size. Presumably because ISIZE_HIGH definition in "xvbrowse.c" has dpiMult addition commented out! When I uncomment this and clear the cached ".xvpics" then yes I get double sized icons.

Note that I do not have a large DPI display, only a standard 90x90 DPI with multiple monitors, the fonts I use is fine. I just want larger icons in the "visual schnauzer" as I find them too small! Which is why I added the 'vs' define mathematics that were included in the old XV jumbo patch in the first place.

As such NO -hidpi does not resolve the issue, and I still needed to re-compile xv with manual changes to "xvbrowse.c" to enlarge icons, but not fonts or other things. As such I do not regard this issue as closed.

mdadams commented 3 months ago

@antofthy If you could submit a PR with a patch that adds the code changes to which you are alluding, this would be the best way to resolve the problem. Alternatively, perhaps you might persuade @william8000 (who added the HiDPI support) to do this on your behalf.

william8000 commented 3 months ago

@antofthy Sorry about the lack of documentation. I didn't have much time, so I didn't want to risk updating the manual before I knew whether the commit would be accepted. If no one has issues with the command line options that I added, I can update the manual.

For the icons, I'm not much of an artist, and I didn't have time to make a second larger copy. I commented out the dpiMult multiplication in ISIZE_HIGH in xvbrowse.c because I thought that it wouldn't work without making new double size icons. If it works, I suppose that you could undo the comment. Maybe I tested it and didn't realize that I had to remove .xvpics.

I made a ScalePixmap() function for experimentation that I used once in xvinfo.c to make the logos next to the information message larger. It could probably be used in other places, but I didn't have time.

I also didn't have time to increase the size of the sliders at the right edge of some windows.

Anyway, is the real issue that multiplying ISIZE_HIGH in xvbrowse.c works, and you want a command line option that multiplies ISIZE_HIGH (or sets ISIZE_HIGH) before it is multiplied by dpiMult so even normal displays can have larger icons?

antofthy commented 3 months ago

First when I said 'icons' I apologise as I meant 'thumbnails. I noticed the 'icons' but didn't have an issue with them.

Deleting ".xvpics" is a way to get XV to re-build all thumbnails, other wise XV does not create a new one for an existing image (older than its thumbnail) at the new size, and just re-uses the existing thumbnail. That is as it should be of course. I am not sure what XV does if the ISIZE is smaller than the existing saved thumbnails as they then wouldn't then fit in the space provided.

A command line option to either set the ISIZE for thumbnails, to user defined values or a selection of values. Default is 80x60, while I currently use 120x90. I do not suggest simply doubling a good solution either, as 1.5 times was pretty good. Some might want to use a square thumbnail size for the types of images they process, though 4x3 ratio is generally good.

I have a shell alias to wrapper the xv commands with the options I use by default (my equivalent ot a configuration file for xv). For example set the -dir option based of the directory of first image. With a command line option I could even make the thumbnail size depend on the directories I am working in at that time ☺

william8000 commented 3 months ago

@antofthy I'll need some time to get back to it. Are you thinking of passing pixels like -isize 120 (for 120x(60*120/80)) or -isize 120x90 (for 120x90) or a scale factor like -isize 1.5 (for round(80*1.5) x round(60*1.5)) ?

antofthy commented 3 months ago

Pixels I think would be better.

Say giving "-isize 120" would result in 120x90 (that is a 4:3 ratio if height is not defined). But I would also allow "-isize 120x120" to specify both width and height, and allowing users to specify square thumbnails.

There should be a warning in the manuals that, it is best to consistently use a specific size for thumbnails, and if changed thumbnails in ".xvpics" sub-directories may require forcefully updating (by deleting and updating), to be resized. The same warning or note should be made for -hidpi and -dpimult options about thumbnails.

I would still think that -hidpi will double the settings (as with everything else). Not that I would use it myself as the fonts are plenty big enough.

Thank you sincerely for taking over the update of the software. I fins XV still a lot better than most other image viewers and browsers, and like how it stores thumbnails in the same directory, and not in the LINUX standard of storing them in " ~/.cache/thumbnails/large/" as hashed named images.

I have a perl script to cleanup thumbnail images (master image deleted, or newer), or to forcefully remove thumbnails (save disk space, or to later forcefully recreate). I'll export a link for you... https://antofthy.gitlab.io/software/#thumbs_cleanup

antofthy commented 2 months ago

Can you please, mark it as not closed? -- Thanks

mdadams commented 2 months ago

@antofthy I re-opened the issue, in the hopes that you and @william8000 might be able to resolve it if you have both the time and motivation to do so.

william8000 commented 2 months ago

@antofthy It is still on my list, but I have another project that I have to finish first.

william8000 commented 1 month ago

@antofthy I made the -isize enhancement as https://github.com/jasper-software/xv/pull/32

antofthy commented 1 month ago

Thanks... Switching to #32