Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNG metadata #164

Closed
joannajw opened this issue Jul 14, 2015 · 1 comment
Closed

PNG metadata #164

joannajw opened this issue Jul 14, 2015 · 1 comment

Comments

@joannajw
Copy link
Contributor

I'm using lwip as part of a project at LinkedIn with @chriseppstein, which involves generating custom PNG images from other images. Since this is computationally expensive, we are currently saving certain information to check if our PNGs need to be regenerated, such as the modification times of the source images. We would ideally like to save this information in the PNG metadata, perhaps in a a tEXt data chunk, and were considering writing this feature for lwip. Is this a feature you would consider accepting, and if so do you have any opinions on how that should be implemented?

@EyalAr
Copy link
Owner

EyalAr commented Jul 20, 2015

Is this a feature you would consider accepting

Absolutely.

how that should be implemented?

I would start by learning how the PNG format defines storing text data in the file. Then this would have to be supported by the decoder and the encoder.
Additionally, the lwip Image type would have to support storing and accessing this data. I.e., passing initial data in the constructor, and providing a 'getMetadata' and 'setMetadata' methods on the prototype.
When an image is decoded from PNG, its metadata would be passed into the Image constructor. When an image is encoded into PNG, the metadata on the Image object would be passed to the encoder.
For all other formats (JPEG and GIF) it can ignored for now.

@EyalAr EyalAr changed the title Feature request: add custom PNG metadata PNG metadata Aug 7, 2015
@EyalAr EyalAr closed this as completed Aug 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants