-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createImageBitmap: Clarify treatment of colorSpaceConversion:"none" ImageBitmaps #10578
Comments
It should also be clarified that YUV to RGB conversions will be performed (it's the rest of the color space conversion that will not be performed). |
Are there tests covering this? cc @whatwg/canvas |
There are some tests of uploading images with "strange" colorspaces in https://github.com/KhronosGroup/WebGL . Specifically, the assets are under https://github.com/KhronosGroup/WebGL/tree/main/sdk/tests/resources , and the more strenuous ones have names like |
There is also wpt/html/canvas/element/manual/imagebitmap/createImageBitmap-colorSpaceConversion.html, which tests this with 2D canvas. It currently only does |
Maybe off topic, but it would be awesome if the interop 2024 team could iron out the problems surrounding It would be a great API if it was usable, for example for image resizing after taking a photo using the camera, via However, there are a bunch of bugs open on both Firefox, Chromium and Safari, around image quality issues, EXIF rotation and other things. I think if those could be solved, this API would enable a lot of great utility! But right now, it isn't quite there. |
@sandstrom good idea, but indeed the wrong place. Please suggest that over at https://github.com/web-platform-tests/interop/issues as a new issue. |
@annevk Thanks! 😄 |
@annevk I've added an issue here: web-platform-tests/interop#731 It's my first submission, anything obvious that I've missed? |
What is the issue with the HTML Standard?
When
createImageBitmap
is called withcolorSpaceConversion:"none"
, the spec indicates the following:It would be helpful to to clarify that the result will be an
ImageBitmap
that has been stripped of its color space information, and is therefore treated like all other images that have no color profile metadata (see here in canvas and here in CSS color). In particular, the raw RGB color values from the source will be treated as though they are in the sRGB color space.Most likely this is best accomplished via an informative note, as is the case in the canvas section.
The text was updated successfully, but these errors were encountered: