-
Notifications
You must be signed in to change notification settings - Fork 191
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
On Mac, rotating image in Finder does not result in rotated image after loading #468
Comments
Can you attach a link to a rotated image? |
Just in case uploading alters the image somehow, here it is compressed. |
What happens if you remove the |
gimp and gnome's image viewer also show the image as non-rotated. I opened the file in imhex, and see an embedded <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 6.0.0">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
dc:format="image/png"
xmp:CreatorTool="Adobe Photoshop 24.4 (Macintosh)"
xmp:ModifyDate="2023-05-09T19:32:18-07:00"
xmp:CreateDate="2022-11-16T19:14:27-08:00"
xmp:MetadataDate="2023-05-09T19:32:18-07:00"
xmpMM:OriginalDocumentID="xmp.did:9d46c96f-0c34-4c07-a596-61726ed10945"
xmpMM:DocumentID="xmp.did:9d46c96f-0c34-4c07-a596-61726ed10945"
xmpMM:InstanceID="xmp.iid:9d46c96f-0c34-4c07-a596-61726ed10945"
tiff:Orientation="8"
photoshop:ColorMode="3">
<xmpMM:History>
<rdf:Seq>
<rdf:li
stEvt:softwareAgent="Adobe Photoshop 24.4 (Macintosh)"
stEvt:when="2022-11-16T19:14:27-08:00"
stEvt:instanceID="xmp.iid:9d46c96f-0c34-4c07-a596-61726ed10945"
stEvt:action="created"/>
</rdf:Seq>
</xmpMM:History>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="r"?> SDL_image does not have a xml parser. |
I would say, if it's difficult to fix, maybe just document it somewhere. Because it is confusing for Mac users. Not the end of the world, since we can rotate with other apps than the Finder, just less convenient. |
Here's the code:
SDL_Surface* surface = IMG_Load(path.string().c_str());
This works usually, but if I use the Mac Finder to rotate an image (command-L), the image appears rotated in the Finder, but loads with the original orientation in SDLImage.
I suspect this is some kind of optimization in MacOS to make rotation a change in metadata instead of actually rotating the image pixels to save time, but I'm not sure.
The text was updated successfully, but these errors were encountered: