Giter Club home page Giter Club logo

Comments (8)

0xC0000054 avatar 0xC0000054 commented on June 1, 2024 1

It is a known bug in with some AVIF decoders, they do not correctly handle images that use the CICP Identity matrix and treat those images as if they use YUV.
Unfortunately the OP did not specify what decoder they are using, but both Microsoft's HEIF Image Extensions (release date 1/29/2018) and Firefox (version 80.0) have this issue.
The images are decoded correctly in Chrome (version 85.0).

The CICP Identity matrix is a color encoding that allows RGB colors to be used without conversion to the YUV color space, this allows for fully lossless RGB encoding.
libavif has the same issue with lossless RGB encoding, AOMediaCodec/libavif#243.

from pdn-avif.

LaaZa avatar LaaZa commented on June 1, 2024

At least XnView MP has this issue, I can see it in thumbnails too but I'm not sure if XnView is the provider for those or something else. Seems to be using libavif (c) 2019. I guess this just needs to be fixed in those affected decoders then. I assume that because 100% is lossless RGB then the chroma subsampling has no effect, should this be made clear in the UI? Currently it is possible to change the setting at 100% without it having any effect.

from pdn-avif.

0xC0000054 avatar 0xC0000054 commented on June 1, 2024

I assume that because 100% is lossless RGB then the chroma subsampling has no effect, should this be made clear in the UI? Currently it is possible to change the setting at 100% without it having any effect.

I could make the chroma subsampling setting read only when the quality setting is set to 100, but the chroma subsampling is also ignored for monochrome images and paint.net does not currently allow FileType plugins to configure UI based on the image content.

It would be confusing if the UI had different behavior for those two cases.

from pdn-avif.

rickbrew avatar rickbrew commented on June 1, 2024

The fact that the preview in Paint.NET doesn't show corrupted colors is further proof that the bug actually lies elsewhere -- the preview is powered by saving to a temp file and then loading it back.

from pdn-avif.

LaaZa avatar LaaZa commented on June 1, 2024

I have to admit that I have not looked at the preview even once because it takes so long to load(was at normal/medium by default though), a general problem with AV1/AVIF I know. Would it be too fancy to only make a preview of a smaller portion of the image if the image is over certain size?
Took a very long time to preview a 18 MP image from my camera at 100% slow(I know slow is slow but the time it took is absurd). I've had my pc just melt trying to encode AV1 in general. Not sure what kind of logic Paint.net allows with these.

Actually assuming the preview is full size, couldn't Paint.net just save that preview if you save the image when the preview is done. Right now after I wait for a preview, possibly for a long while, after I save it it'll just take as long to actually save.

Sorry I'm getting slightly off topic. I think what is happening is definitely some decoders(or their specific use) assuming the image is YUV when it in fact is RGB, the resulting colours also look something like that. Like changing your monitor's color space to YUV when the input is actually RGB, looks similar.

from pdn-avif.

0xC0000054 avatar 0xC0000054 commented on June 1, 2024

I think what is happening is definitely some decoders(or their specific use) assuming the image is YUV when it in fact is RGB, the resulting colours also look something like that.

That is what would be happening when the quality is at 100%.

from pdn-avif.

LaaZa avatar LaaZa commented on June 1, 2024

Actually interestingly enough XnView MP shows properly in the image properties that the images are RGB lossless, however their ExifTool shows YUV 4:4:4.

Edit: nevermind the properties seems to always say Color model: RGB while YUV is shown in the Color format, it still says lossless.

from pdn-avif.

0xC0000054 avatar 0xC0000054 commented on June 1, 2024

Closing this issue as it is not a bug in the plugin.

from pdn-avif.

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.