-
Notifications
You must be signed in to change notification settings - Fork 140
No error when comparing images with transparent areas #14
Comments
Can you explain what do you mean by a format? |
@robryk i mean different image types.For example if you compare a JPG with a PNG there is no error. |
Why do believe there should be? Image format is just a way of storing an image, similarly a filesystem is just a way of storing files. Would you expect an error if I wanted to compare two JPEGs that reside on different filesystems? |
Certainly not My logic is that PNG supports transparency unlike JPG.It seems like an unfair comparison to me.For e.g take a PNG image that isn't transparent , convert it to jpg.Then when you compare the original PNG with the JPG. I certainly didn't look at it with the file systems perspective thought |
Ah, I see. So as far as I understand, the issue is that if the PNG uses transparency, the results might be different than expected, whatever we choose them to be. Please correct me if I misunderstood. Still, there's lots of cases when one has a PNG without transparency and wishes to compare it with a JPEG. I'd very much like to preserve this possibility. Right now, whenever we (both in Butteraugli and Guetzli) read a PNG with alpha channel, we overlay it on black. What would your alternate proposal be? Report an error if there's an alpha channel and it's not all-opaque? |
Can you enlighten me on this by giving some example use case.
Exactly ....report an error if alpha channel exist and image isn't opaque.A flag say |
I have a PNG (it's a PNG because I want a lossless format). I encode it as a JPEG using some tool. I then want to see how well does the tool do on this image (and maybe, I intend to adjust the quality level to achieve some Butteraugli score at lowest possible cost).
One nit: an image might have an all-opaque alpha channel. We should treat it the same as a similar image with no alpha channel. I am fine with such a change (even without the flag; adding flag handling here is likely going to be very annoying). I won't have time to do that in the near future, but would welcome PRs. |
Its an interesting use case and it give me an idea.We could have a function say
Yup
Very annoying in terms of time usage or because the tool is quite popular and would annoy people |
When you compare images of different formats , the output is a value.I think an error should be displayed in such a situation.
The text was updated successfully, but these errors were encountered: