Skip to content

Conversation

@DavidBertet
Copy link
Contributor

Summary

Fix #517. iOS simulator pictures are PNG instead of JPEG

Use UIImageJPEGRepresentation instead of UIImagePNGRepresentation

How did you test this change?

  • Run on iOS simulator iPhone 14 Pro
  • Take a picture
  • Check the output file

Before

> file 16EA62A2-A2EC-4A45-B453-A9BA464EF668-70523-0000038BA79327B9.jpg
16EA62A2-A2EC-4A45-B453-A9BA464EF668-70523-0000038BA79327B9.jpg: PNG image data, 1179 x 1752, 8-bit/color RGBA, non-interlaced

After

> file 70860A42-CC25-4FA3-AF27-F3DB397F6E2E-77443-0000039447870404.jpg
70860A42-CC25-4FA3-AF27-F3DB397F6E2E-77443-0000039447870404.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 216x216, segment length 16, Exif Standard: [TIFF image data, big-endian, direntries=5, orientation=upper-left, xresolution=74, yresolution=82, resolutionunit=2], baseline, precision 8, 1179x1752, components 3

Copy link
Collaborator

@scarlac scarlac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Thank you.

@scarlac scarlac merged commit 815730e into teslamotors:master Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS Simulator returns PNG image with .jpg filename

2 participants