image
image copied to clipboard
`r,g,b,a` values of monochrome images
This is the image I'm trying to parse:
I've zipped it up to avoid any possible GitHub compression: View-Details-256.zip
My app (Saber) inverts images using the image
package. You can see the changes I made to debug this issue here:
The only information printed to the console is the following, which tells us that the alpha channel isn't being parsed properly (it's 255 for all pixels)...
flutter: invertImageIsolate
flutter: format: Format.uint8 2
This is also demonstrated in the outputted images:
In fact, the unique pixel values I can see in the decoded image are (the alpha value is always 255)...
rgb(0,0,0)
, rgb(255,223,0)
, rgb(255,255,0)
, rgb(255,191,0)
, rgb(255,167,0)
, rgb(255,128,0)
, rgb(255,112,0)
, rgb(255,159,0)
, rgb(255,139,0)
, rgb(255,96,0)
, rgb(255,84,0)
From this, I believe that, e.g. in rgb(255,191,0)
, r=255
should be r,g,b=255
and g=191
should be a=191
if that makes sense?
I haven't had a chance to look at it yet, but my suspicion is that the images are 2 channel luminance-alpha images and yeah, I don't think I handle them in a good way. It's probably currently putting the two channels into RG rather than RA.