GithubHelp home page GithubHelp logo

Comments (4)

haraldk avatar haraldk commented on June 5, 2024

Hi Boris,

Thanks for reporting!

I see your issue, and I agree, these are incorrectly recognized as RGB.

The images both has the following comment:

"Intel(R) JPEG Library, version [2.0.18.50]"

So I guess this is the software/library used to create them.

However, these images both have APP0/JFIF markers, and the JFIF spec says 3 channels should always be YCbCr (never RGB). So instead of your proposed change, I think I'll just check for the presence of the JFIF marker, and default to YCbCr for those and RGB otherwise (after testing component ids, subsampling etc). This is more generic and probably a better fix long term. Also, it works for all my test cases + extended test suite of more than 200 (more or less malformed) JPEGs. :-)

I'll try to push the fix as soon as possible, along with an updated regression test.

Best regards,

Harald K

from twelvemonkeys.

kendoboris avatar kendoboris commented on June 5, 2024

Hi Harald,

Thanks for your quick response!

Regarding:

I think I'll just check for the presence of the JFIF marker, and default to YCbCr for those and RGB otherwise (after testing component ids, subsampling etc). This is more generic and probably a better fix long term. Also, it works for all my test cases + extended test suite of more than 200 (more or less malformed) JPEGs. :-)

That sounds great. I will be looking forward to the release :)

Thanks again.
Boris

from twelvemonkeys.

haraldk avatar haraldk commented on June 5, 2024

Ok, just pushed a fix for this issue:

037a47c

Best regards,

Harald K

from twelvemonkeys.

kendoboris avatar kendoboris commented on June 5, 2024

Great! Thanks again.

Best,
Boris

from twelvemonkeys.

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.