Skip to content
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

EncodedOrigin reporting incorrect value #1145

Closed
smillershout opened this issue Feb 13, 2020 · 5 comments
Closed

EncodedOrigin reporting incorrect value #1145

smillershout opened this issue Feb 13, 2020 · 5 comments

Comments

@smillershout
Copy link

Description

As a result of all pictures captured on iPhone being in the camera's natural landscape orientation, I'm attempting to rotate these images in order to correct the appearence of non-landscape images. In order to do this, I'm evaluating the EncodedOrigin property on an instance of SKCodec which is associated with the image. Based on the result of the EncodedOrigin, for example, if the result is 'BottomRight' or 'RightTop', I'm rotating the image apporpriately to 'correct' the orientation. Oddly, this worked very well on iOS prior to 13.3. Since 13.3 however, the EncodedOrigin is now returning 'Default' for all images regardless of their orientation.

I was wondering if anybody else had encountered this issue and whether or not there is a resolution?

Thanks,
Sam.

Code

using (var stream = new SKManagedStream(fileStream))
using (var codec = SKCodec.Create(stream))
{
Console.WriteLine("EncodedOrigin = " + codec.EncodedOrigin);
}

Expected Behavior

EncodedOrigin should return correct value based on image orientation on all versions of iOS

Actual Behavior

EncodedOrigin is returning 'Default' regardless of image orientation on iOS 13.3 and above

Basic Information

  • Version with issue: SkiaSharp 1.68.0 and iOS 13.3.1
  • Last known good version: SkiaSharp 1.68.0 and prior to iOS 13.3
  • IDE: Visual Studio 8.4
  • Platform Target Frameworks: Xcode Version 11.3.1
    • iOS: 13.3.1
    • macOS: 10.15.2
  • Target Devices: iPhone plus device. eg. iPhone 7+ and iPhone 8+
@smillershout smillershout changed the title EncodedOrigin reporting correct value EncodedOrigin reporting incorrect value Feb 13, 2020
@mattleibow
Copy link
Contributor

iOS 13.3.1 has been interesting recently. I think it may be that the camera is leaving things out. Can you take a photo and check to see where the origin is on a laptop? Maybe in photoshop or similar?

@smillershout
Copy link
Author

Hi @mattleibow, thank you for the response. I will double check this. I figured it might be something that Apple has changed. I will take more pictures and check out the metadata through other means. Never thought of this. I have some other things on today but I will get back ASAP.

Thanks again,
Sam.

@TamasRemenyi
Copy link

This thread may have useful information related to this iOS bug.
jamesmontemagno/MediaPlugin#760 (comment)

@smillershout
Copy link
Author

Hi all, just to confirm that this was indeed related to the Media Plugin. I will close this issue now.

Thanks,
Sam.

@mattleibow
Copy link
Contributor

@smillershout thanks for the update

@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants