WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
48138
texImage2D does not respect orientation of underlying image
https://bugs.webkit.org/show_bug.cgi?id=48138
Summary
texImage2D does not respect orientation of underlying image
Dean Jackson
Reported
2010-10-22 10:35:39 PDT
The image object passed to texImage2D might come from a source that has set a non-zero orientation. At the moment, the texImage2D implementation ignores this and calls the native method with the CGImage that the image object holds. This means if you load an image format that supports orientation, and the orientation is non-zero, then the texture will be using the wrong width and height. CGImage doesn't know about orientation either, so the native call to texImage2D is doing the right thing. It's just that the higher level API of WebGL doesn't allow us to rotate the image - <img> elements have no concept of orientation.
Attachments
Add attachment
proposed patch, testcase, etc.
Kenneth Russell
Comment 1
2010-10-22 10:37:30 PDT
What image formats support orientation?
Dean Jackson
Comment 2
2010-10-22 10:39:33 PDT
PNG and TIFF for example.
Dean Jackson
Comment 3
2010-10-22 10:39:53 PDT
I will make a test case soon. Just not today.
Zhenyao Mo
Comment 4
2010-10-22 10:44:39 PDT
We might want to revisit the image format issue in WebGL. Possibly posing some limitation for what image formats WebGL will support. I've uploaded at least 5 patches for that function in GraphicsContext3DCG.coo already, and there are still so several cases not covered.
Zhenyao Mo
Comment 5
2010-10-22 10:46:34 PDT
I am also curious if Skia is honoring the orientations. Once Dean uploads a test case, I will verify that.
Dean Jackson
Comment 6
2010-10-22 11:08:20 PDT
Yeah, maybe Skia rearranges the data as it loads - that would be nice. This same problem can hit native code using CGImage. The difference here is that we don't have any way to know the source orientation.
Kimmo Kinnunen
Comment 7
2024-01-17 01:04:58 PST
Should work now, WebGL CTS has tests
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug