Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-page TIFF support? #190

Open
ptlambert opened this issue Feb 6, 2025 · 2 comments
Open

Multi-page TIFF support? #190

ptlambert opened this issue Feb 6, 2025 · 2 comments

Comments

@ptlambert
Copy link

Is your feature request related to a problem? Please describe.
Yes. PicView v3.0.1 only displays the first page of multi-page TIFF files (e.g. those created with Windows Fax and Scan).

Describe the solution you'd like
It would be helpful if PicView could display all the pages in a multi-page TIFF file.

Describe alternatives you've considered
I've currently associated .tif and .tiff files with the legacy Windows Photo Viewer built-in to Windows 10. Windows Photo Viewer correctly displays multi-page TIFFs, but I'd rather not rely on that legacy app any longer...

Additional context
Nothing to add here except that PicView is a great standalone replacement for Microsoft's various UWP photo browsers. I prefer to not have all of my photos catalogued on OneDrive and potentially accessible by anyone and everyone... So thanks for offering this sleek little tool; it nicely meets my needs for data privacy. I just sent you a donation via your Ko-fi page. :^)

Ruben2776 added a commit that referenced this issue Feb 6, 2025
@Ruben2776
Copy link
Owner

Thank you very much!

I have added some initial support for navigating within tiff pages. However, it is not extensively tested yet and may have some unexpected bugs.

You can download the updated version, and try it out, if you wish, by scrolling down to the bottom of this page.

@ptlambert
Copy link
Author

Thanks for those test builds (they became clickable links after logging into GitHub). I did a clean uninstall of the production v3.0.1 x64 release and then installed the corresponding test build...

Basic forward navigation using the right arrow key within a multi-page TIFF seems to be working fine. However if I use the left arrow key to attempt reverse navigation from any page within in the same TIFF, I'm immediately taken to the first page (and can't go any further backwards). This seems a bit counter-intuitive to me? I would expect that if I'm on page 3 of a 4 page TIFF, a single press of the left arrow key would take me to page 2 (and not page 1).

Also, it might be nice to have a way to enable looping within the document itself, i.e. a way to jump from the last page in the document to the first page (on forward navigation), and vice-versa (on backward navigation)? But I do understand that this would take additional programming (on top of what you've already done here) and extra controls to implement properly, so this is not a priority (for me at least) for an initial effort.

Also, some improvement could definitely be made with the page numbering syntax in the label at the top of the PicView window. With a four page TIFF as the only image file in a directory, PicView labels the first page with the file name and file counter (as expected) but then labels the additional pages with only the filename -- but modified to show a page counter:

multi-page-filename.tif 1/1 file
multi-page-filename [1/3].tif
multi-page-filename [2/3].tif
multi-page-filename [2/3].tif

This syntax doesn't correctly label the remaining pages (e.g. "[1/3]" is actually page 2 of 4), and it also changes the actual filename when referencing pages other than the first. And this syntax would be even more confusing with files that include brackets in their names...

I think that in all cases you should retain the actual filename and file number counter, and include an additional page counter for multi-page files, e.g.

multi-page-filename.tif 1/1 file 1/4 pages
multi-page-filename.tif 1/1 file 2/4 pages
multi-page-filename.tif 1/1 file 3/4 pages
multi-page-filename.tif 1/1 file 4/4 pages

(or something similar). This may seem a bit verbose but I think it's especially needed when browsing directories with more than one image file. For instance, browsing near this multi-page TIFF in a folder with 550+ random images shows these labels in PicView:

filename1.png 557/565 files
filename2.webp 558/565 files
multi-page-filename.tif 559/565 files
multi-page-filename [1/3].tif
multi-page-filename [2/3].tif
multi-page-filename [2/3].tif
my-filename1.png 560/565 files

The result here with the current labeling syntax is that while displaying the second and subsequent pages in a multi-page TIFF, we've completely lost the navigation hints that would normally appear in the label -- but this is where those hints would be the most helpful. Again, I think something like this instead would work better:

filename1.png 557/565 files
filename2.webp 558/565 files
multi-page-filename.tif 559/565 files 1/4 pages
multi-page-filename.tif 559/565 files 2/4 pages
multi-page-filename.tif 559/565 files 3/4 pages
multi-page-filename.tif 559/565 files 4/4 pages
my-filename1.png 560/565 files

Or perhaps putting the page count before the file count would make more sense both logically and visually?

filename1.png 557/565 files
filename2.webp 558/565 files
multi-page-filename.tif 1/4 pages 559/565 files
multi-page-filename.tif 2/4 pages 559/565 files
multi-page-filename.tif 3/4 pages 559/565 files
multi-page-filename.tif 4/4 pages 559/565 files
my-filename1.png 560/565 files

In any case, the numbering sequence for pages following the first needs to be corrected; and including the file count for those pages makes the labeling syntax more consistent.

Thanks for your time...

Ruben2776 added a commit that referenced this issue Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants