Giter Site home page Giter Site logo

Comments (3)

JimBobSquarePants avatar JimBobSquarePants commented on May 13, 2024

Hi @pconfig thanks for raising this and supplying the offending image.

@dlemstra You had a quick look at this didn't you? Could you note your findings here please and I'll see if I can figure out how to get it working.

from imagesharp.

dlemstra avatar dlemstra commented on May 13, 2024

The issue is this line: https://github.com/JimBobSquarePants/ImageSharp/blob/master/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs#L1189. With 4 channels CMYK should be assumed (https://docs.oracle.com/javase/8/docs/api/javax/imageio/metadata/doc-files/jpeg_metadata.html). But it looks like only YCbCr is supported in the block inside the if.

If an Adobe APP14 marker segment is present, the colorspace is determined by consulting the transform flag. The transform flag takes one of three values:
2 - The image is encoded as YCCK (implicitly converted from CMYK on encoding).
1 - The image is encoded as YCbCr (implicitly converted from RGB on encoding).
0 - Unknown. 3-channel images are assumed to be RGB, 4-channel images are assumed to be CMYK

from imagesharp.

JimBobSquarePants avatar JimBobSquarePants commented on May 13, 2024

Ok... So what we originally thought was CMYK was actually YCCK... (I really do hate Jpeg and Adobe most of all.)

I've added the conversion method but without ICC profile support we're not going to be able to get the hue/saturation 100% correct.

from imagesharp.

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.