HaikuArchives / ArtPaint

ArtPaint is a painting and image processing program.
https://haikuarchives.github.io/ArtPaint/
29 stars 18 forks source link

Add versioning to file format #540

Open dsizzle opened 1 year ago

dsizzle commented 1 year ago

ArtPaint currently has no versioning for the project files. It would be useful to have when there is an inevitable breaking change to the format so that users can be alerted to incompatibilities rather than either crashing or silently ignoring parts of a file.

humdingerb commented 1 year ago

Is this something to be looked into before the next release introducing compressed layer data?

dsizzle commented 1 year ago

I hadn’t planned to tackle this right away. If you’re concerned about the compression I can just disable it easily.

(It is as simple as changing the “ZLIB_COMPRESSION” to “NO_COMPRESSION” in Image::WriteLayers)

humdingerb commented 1 year ago

If you don't see a problem, I'd rather keep the compression if possible. I suppose in the future, if ArtPaint happens on an unversioned project file, it can assume it to be from an ArtPaint <= v2.6 (our upcoming release).

dsizzle commented 1 year ago

I worry about an unrecoverable file corruption with the compression that we haven’t run across yet, just because the compression part is relatively new.

humdingerb commented 1 year ago

What better opportunity to widen our pool of testers? :) If people encounter related showstoppers that you can't fix quickly, we can revert to uncompressed and do a quick point release.