richgel999 / fpng

Super fast C++ .PNG writer/reader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding resolution/icc info tags and 8 bits support ?

sebastienleon opened this issue · comments

Hi Rich,
(I sent an email about this issue, but I guess it didn't reach you)

fpng is really efficient and interesting work. Congratulations !

However, to cover most of png usual features (and according my need), I think it would be great to add the following support/features :

  • resolution information (easy to add)
  • ICC profile (or at least the sRGB tag) (somehow easy to add)
  • support for indexed pictures (more complicated)

I think that I can add the support of resolution and icc profile, keeping the code fast and the API simple (just passing an
extra pointer for optional tags, that can be extend to other tags in the future)...

Do you think you may extend your code in the future to support indexed images ?

Best regards

Sébastien Léon

Hi guys,
FYI, I implemented these 2 extra features :

  • Resolution information (easy to add)
  • ICC profile (or at least the sRGB tag) (somehow easy to add)
    Do you want me to commit to merge with head ?
    (if the feature is not used, it doesn't take extra time and when used, it is quite fast)
    Best regards
    Sébastien

Do you want me to commit to merge with head ?
Could you give me a PR against head?

Hi,
Thanks for your answer !
I will do that in 2 weeks.
Thanks

commented

Hi, looking forward to this feature of 8(/16) bit support, any update?

Hi MiaoDX,
I implemented support for resolution and ICC profile tags (and I can make a PR so Rich can integrate it in head).
Unfortunately, I didn't look into the 8 bits supports as it is more an in-depth feature :-(
But, I would be really really interested to get 8 bits supports too.
Sébastien

commented

@sebastienleon

Thanks, we switched to https://github.com/facebook/zstd for quicker integration.
Maybe fpng can be quicker latter, but we are encoding/decoding int8/int16 images, and after testing, ztsd is pretty good.

Maybe it's not bad to add extra comparison in the benchmark @richgel999