0

I'm generating JPEG image data using UIImageJPEGRepresentation(UIImage, 1.0) in Swift version 4(?).

I'm using a 3rd party JPEG decoder but it throws an error that no SOI (start of image) marker was found.

How do I generate a correctly formatted JPEG with SOI markers in Swift (preferably) or Objective-C?

Is this a known issue in standard Swift and should I start looking at 3rd party JPEG encoders?

pinglock
  • 982
  • 2
  • 12
  • 30
  • Are you sure the problem is in the JPEG image data? Or perhaps the problem rests in your third-party decoder? Which JPEG decoder are you using? FWIW, I'm looking at the JPEG created by iOS and I see the SOI there, so I suspect your problem rests elsewhere. But there's not enough here for us to diagnose the problem. – Rob Jul 31 '20 at 21:01
  • It is a proprietary decoder for work that is not publicly accessible. I'm going to move forward under the assumption that the fault is in the decoder and not `UIImageJPEGRepresentation`. – pinglock Jul 31 '20 at 22:35

1 Answers1

1

Resolving under the assumption that the fault lies in the decoder and not UIImageJPEGRepresentation.

pinglock
  • 982
  • 2
  • 12
  • 30