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

iOS Simulator returns PNG image with .jpg filename #517

Closed
sammko opened this issue Jan 23, 2023 · 1 comment · Fixed by #548
Closed

iOS Simulator returns PNG image with .jpg filename #517

sammko opened this issue Jan 23, 2023 · 1 comment · Fixed by #548

Comments

@sammko
Copy link

sammko commented Jan 23, 2023

Describe the bug
When this library is used inside the iOS simulator, captured images are not JPEGs but PNGs. The documentation does not mention this, nor is the created filename correct (it ends with .jpg).

I believe the issue is caused by this line:

[self writeCapturedImageData:UIImagePNGRepresentation(previewSnapshot) onSuccess:onSuccess onError:onError];

To Reproduce
Steps to reproduce the behavior:

  1. Call capture() in iOS simulator
  2. Examine output file

Expected behavior
Convert to JPEG before writing to file with .jpg extension, or use .png and mention in the documentation that the returned file is not necessarily JPEG.

Smartphone (please complete the following information):

  • Device: iPhone 14 Simulator
@larkonesvk
Copy link

Same here. For me expected result should be JPEG image with .jpg extension

scarlac added a commit that referenced this issue Jun 12, 2023
Fix #517. iOS simulator pictures are PNG instead of JPEG
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 a pull request may close this issue.

2 participants