mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
tiff compression (tiff: unsupported feature: compression value 7) #955
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#955
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ymgenesis on GitHub (May 20, 2021).
Originally assigned to: @lastzero on GitHub.
During photo indexing the logs return several errors regarding the formatting of some of my .tiff scanned images.
Does this have anything to do with this stack overflow question?, mainly that photoprism will use
libtiffto resample tiff to jpg, and that the7tag means the images use theJPEG ('new-style' JPEG)compression scheme, which isn't supported by default? If so, is it possible to add support for theJPEG ('new-style' JPEG)compression scheme? I have hundreds of them (scans of family history photos, docs, artifacts, etc), and was the main reason to install photoprism. I'd happily provide a sample that throws these errors.Second, each time I add new photos to my library and go to index them in, it'll try to re-process these .tiff files, adding a fair chunk of time to indexing before getting to the new photos. Is there anything to help this, other than removing them from the index folder?
@lastzero commented on GitHub (May 20, 2021):
Go - the programming language we use - doesn't support all TIFF features. Don't think this is libtiff, which sounds like a C library.
@lastzero commented on GitHub (May 20, 2021):
Since it's an error, the indexer tries to index them again.... you can for example use a .ppignore file to exclude them if you know this will never work or create JPEGs manually with a decoder that supports your feature set.
@lastzero commented on GitHub (May 20, 2021):
You're welcome to send a feature request to the Go developer community. I'd be happy to implement this for you, but you see how long our todo list already is...
Alternatively we can use an external converter tool in a future release. Would be good if you can test which one works for you, ideally providing us with a list / comparison.
@ymgenesis commented on GitHub (May 20, 2021):
Where would I put the jpegs once I've created them? in the corresponding sidecar folder?
I'd imagine a streamlined solution would probably be best (no need to convert externally before indexing). Some of the .tifs work, maybe it was the specific scanner I used compressed them a specific way. I'll try making jpegs externally and place them in the sidecar folders and see what happens when I index again.
@lastzero commented on GitHub (May 20, 2021):
Please put them next to the originals if you create them manually using the same name (prefix before the file extension). The sidecar path is for automatically created sidecar files to separate them, although technically it might work to put them there manually as well.
@lastzero commented on GitHub (May 20, 2021):
Yes, it was probably the app that caused the special compression - maybe based on some settings. TIFFs are usually uncompressed and pretty large, that's their prime use case. Many camera RAW formats are also based on TIFF for this reason. If you want compression, you typically use JPG or PNG nowadays.
@ymgenesis commented on GitHub (May 20, 2021):
Ya I specifically remember using tiff when scanning family history because I didn't want compression. It looks like my old scanner would use LZW compression without my knowledge. I think that's another issue, though. It returns a different error
I'll get back to you on creating jpegs for the sidecar folders. I'd rather try and place them in sidecar manually without messing up the structure/organization of my photo library. I can be stubborn about that :p
@lastzero commented on GitHub (May 20, 2021):
It's good to have standard JPEGs (or even PNGs if you don't like compression) to archive family photos. Uncommon TIFF encodings might not be readable anymore in the future. In fact, already today.
@ymgenesis commented on GitHub (May 20, 2021):
Ya maybe I'm going overkill, but it does make sense to have a 'supreme quality' master at source so I can compress and send if needed. Thanks for the help I'll let you know how it goes.
@lastzero commented on GitHub (May 20, 2021):
LZW was ringing a bell with me, it used to be patent protected. That's why open-source software typically doesn't support it anymore, not due to technical issues or laziness of the developers.
https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch#Patents
@ymgenesis commented on GitHub (May 20, 2021):
Question, how would I get photoprism to ignore all .tif/.tiff images, if I decide to convert them all to jpgs? I'll still keep the original .tifs in the library, but I'd just like photoprism to ignore that file extension. Can't seem to find instructions on using .ppignore. is it simply putting a .ppignore file in the originals folder with the text:
Ah, I see it here.
@lastzero commented on GitHub (May 20, 2021):
Yes
@lastzero commented on GitHub (May 20, 2021):
Won't affect already indexed files though
@ymgenesis commented on GitHub (May 20, 2021):
Right, so to remove the .tifs that are there now, would I remove their .yml and .jpg in the sidecar folders?
@lastzero commented on GitHub (May 20, 2021):
You'd need to remove all files and reindex. But you can also just the delete the tiffs and keep the JPEGs if you want to use those anyways.
@ymgenesis commented on GitHub (May 20, 2021):
By remove all files, do you mean from the sidecar folder? Example if I want to remove sample.tif I would just find the folder it's in in sidecar and remove it along with its .yml. in my originals folder I just have the folders with nothing in them as I haven't imported anything. Would like to purge the photoprism library of the tifs I had indexed in, but keep the indexing I have done to this point (took a couple days).
@lastzero commented on GitHub (May 20, 2021):
The tiffs are your originals. Sidecar files alone won't get indexed, just if there is a matching original.
@ymgenesis commented on GitHub (May 20, 2021):
I want to keep the tiffs in my organized photo library on disk (not photoprism). They'll be accompanied by jpgs. I'd like to remove (from photoprism) the tiffs that have been indexed into photoprism, and index in the jpgs that I've created from the tiffs. I've added the .ppignore to the originals folder. I understand it will only ignore tiffs moving forwards.
How do I make it so only the new jpgs I've created from my previous tiffs are the only versions of those photos in photoprism? About 20% of the tiffs didn't get indexed and returned the errors I mentioned before. The rest were converted and indexed in properly. I'm trying to get them out and make it jpgs across the board without removing the original tiffs from my photo library on disk (which is mounted for indexing in my
docker-compose.ymlfile).I appreciate your help!
@lastzero commented on GitHub (May 20, 2021):
You forcefully want to remove working TIFFs from the index but keep related JPEGs? Does it hurt to keep them if they are OK and cause no errors? Otherwise maybe start with a fresh index database and use the ignore file from the start.
@ymgenesis commented on GitHub (May 20, 2021):
I have 500-1000 tiffs I want to organize into family history albums. A portion of them didn't index in properly, leaving my family history library in photoprism incomplete.
Instead of using logs to figure out which tiffs exactly weren't converted to jpg and indexed in properly when the original index ran, I'd like to remove all the tiffs and index in new jpgs of all 500-1000 tiffs. I'd like to keep the tiffs in my photo library on disk, utilizing .ppignore to ignore them in photoprism. I've already created the jpgs alongside the tiffs in my photo album. Folders look something like
scan1.tifwith an accompanyingscan1.tif.jpg, etc. If I run the index again, the new .tif.jpgs will be indexed in, creating duplicates of the tiffs that did make it into photoprism. To remedy that I'd like to remove the original .tifs. I suppose I'll have to start the library from scratch again. I was hoping to remove the converted tifs and their .yml files from the sidecar folders, but I understand they'd still remain in the database.@lastzero commented on GitHub (May 20, 2021):
That'd be the easiest way.
@ymgenesis commented on GitHub (May 20, 2021):
What would the difficult way(s) entail, if you don't mind me asking. My library took a handful of days to fully index in, and it crashed twice, causing me to start again. At this point if I can get them out manually in a day or two, it's a win.
I'm assuming there's a way to delete photos from photoprism, and it would also delete from mariadb?
@lastzero commented on GitHub (May 20, 2021):
Well, you could book personal support as this isn't explained in one sentence. Are you a sponsor already?
@ymgenesis commented on GitHub (May 20, 2021):
I'm not, was just assuming I'd get some advice here (which I have been getting from you), but I totally understand. You've talked with me for a while and I appreciate it! I'll figure it out haha. Thanks again.
@lastzero commented on GitHub (May 22, 2021):
I'll close this as we're probably not able to support LZW compression in TIFFs anytime soon. It's best for now to convert them to PNG or JPEG using external tools.