Learn Courses My Dashboard

Image is sideways

So I am using swift playgrounds because I’m on ipad. And I am following @Chris_Ching 3.5 hour masterclass.
I was just coding at the first part where he was teaching abut the Image command. And I used it to put a photo of my my dog by inserting a photo into Swift Playgrounds. Then when I ran it. Instead of being upright. It was sideways. And then I tried a different image. And it still was sideways. Can someone help me fix it so it can be upright. Is there like a different command or something,

Thanks guys,

Welcome to the community.

If you take an image on an iPad or an iPhone, the image stores the device orientation with the image.

You can rotate the image in Swift using the CGAffineTranform function.