Git Product home page Git Product logo

Comments (5)

HeroicKatora avatar HeroicKatora commented on June 24, 2024

Looks like it's embedding two iCCP (color management) chunks, which is invalid. Most likely, the editing software takes one of them out of the image before resaving. Do you have an example file to verify?

from image.

kangalioo avatar kangalioo commented on June 24, 2024

I'm also running into this problem in my project. Can reproduce in a blank project with

fn main() {
    image::open("wafles-mine.png").unwrap();
}

and the following file:
wafles-mine

Versions:

  • image 0.24.5
  • png 0.17.7

from image.

HeroicKatora avatar HeroicKatora commented on June 24, 2024
$ pngfix /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png 
zTXt OK  maximum 15 15 10002 21457 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
iCCP OK  default 15 15 2595 3144 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
iCCP OK  default 12 12 2595 3144 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
IDAT OK  maximum 15 15 4987 16448 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png

This is supposed to be valid?

Unless a cICP chunk exists, a PNG datastream should contain at most one embedded profile, whether specified explicitly with an iCCP or implicitly with an sRGB chunk.

Suppose we interpret should too strongly and should rather ignore the duplicate? After all, the chunk is technically not critical but that seems like a potential hazard to me if we only report one.

An iCCP chunk contains zlib/deflate compressed data. The two chunks are both identified as Photoshop ICC profile and start with bytes 48 89 and 78 9C respectively, meaning two different compression settings had been used in their creation. Still, most data actually ends up being the same. Is that the same data, which is short enough to be mostly unaffected by the window size?

from image.

kangalioo avatar kangalioo commented on June 24, 2024

Suppose we interpret should too strongly and should rather ignore the duplicate?

I think so

Still, most data actually ends up being the same. Is that the same data, which is short enough to be mostly unaffected by the window size?

I'm not sure what data you mean here. The zlib/deflate compressed data of the iCCP chunk? What does it have to do with the window size? (disclaimer: I haven't delved into image formats before)

from image.

kangalioo avatar kangalioo commented on June 24, 2024

That issue has only started happening with 0.17.4, which makes sense, because image-rs/image-png#334 was merged by then

from image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.