Hacker News new | past | comments | ask | show | jobs | submit login

PhotoStructure maintains SHAs of all files, but I currently assume the user has updated the file if the SHA changes. PhotoStructure validates files before it imports them to keep corrupted images out of your library.

How do you think I could discriminate between file corruption and the user making an edit to a file?

(Perhaps if the mtime and filesize doesn't change, but the SHA does?)




In a non-destructive workflow, the image data is never modified. The image data checksum should never change. Rather, the edits are a kind of "edit list" stored in metadata, which can itself be optionally (separately) checksummed. If the metadata is corrupt, it can be discarded, effectively resetting the image back to its original pre-edit state. Yes, you'd lose the edits.

The location for metadata depends on the application. For DNG workflows, the metadata is a separate location in the DNG file, with separate metadata and data checksums. For other workflows, the metadata is in a sidecar (a per image file), or stored in a database managed by the application.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: