0

I'm playing with image-optimized diffs for storing edits to artwork. Version control seems to treat images as binary blobs, which means changes to common compressed formats like PNG/JPEG rewrite ≈90% of the file, so updates eat roughly the same space as storing separate files anyway.

Instead of writing some bit-twiddling code myself, I had an idea. We already have highly optimized algorithms for storing differences between images: video codecs.

What video codecs out there allow for lossless reconstruction through their interpolation (“b”) frames? The most common ones all understandably err on the lossy side.

Tigt
  • 1,330
  • 2
  • 19
  • 40
  • 1
    e.g. [HEVC lossless mode](http://x265.readthedocs.io/en/default/lossless.html) (the encoder will find optimal inter or intra predictions and then losslessly code the residual) – DaBler Sep 15 '17 at 21:53
  • What's the problem with using your favorite web-search ```lossless video codec``` What do you mean by *allow for lossless reconstruction through their interpolation (“b”) frames*? If a codec is lossless, it's lossless (at least in this color-space)! H265, H264, FFV1, pick one. But using video-tools here sounds not right. Your artwork is what? Scanned stuff? Pixel-perfect BMPs? Vector-graphics? Photoshop-files? – sascha Sep 15 '17 at 21:53
  • @sascha I don’t really have a favorite — I was hoping somebody with more experience than I could point me in some directions more promising than what I’ve found on my own. The artwork is anything from pixel-art to JPEG — the full spectrum of raster images, basically. Partial transparency and so on. – Tigt Sep 15 '17 at 22:05
  • That does not make much sense. You have to improve your question a lot. If there is some input jpg, any lossless image or video codec can store this losslessy, but you will not be able to restore the jpeg itself in general. And videos are all about mostly flat images; not some layered Photoshop workspace (although that's really not my area). Transparency is some additional problem i would think. – sascha Sep 15 '17 at 22:15
  • @DaBler I would happily accept that as the answer if you provided it as one. – Tigt Jul 05 '18 at 02:55

1 Answers1

1

For example, HEVC lossless mode – the encoder will find optimal inter or intra predictions and then losslessly code the residual.

(Moved from a comment.)

DaBler
  • 2,695
  • 2
  • 26
  • 46