0

I have been able to convert a QR code I have generated from a CIImage to UIImage.

However, the resulting UIImage does not have a set aspect ratio.

So, if you put it into a UIImageView with an aspect ratio which isn't 1:1, even if the content mode is set to aspect fit, it stretches the QR code out of proportion.

How can I can convert this QR code to UIImage in such a way that it will hold its aspect ratio if the container view asks for it?

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Matt Spoon
  • 2,760
  • 5
  • 25
  • 41
  • refer http://stackoverflow.com/questions/35737160/cifilter-has-changed-uiimage-aspect-ratio-swift – Surya Subenthiran Apr 19 '16 at 13:58
  • Possible duplicate of [How to preserve image aspect ratio in iOS UIImageView when doing CIFilter, like CISepiaTone](http://stackoverflow.com/questions/18241773/how-to-preserve-image-aspect-ratio-in-ios-uiimageview-when-doing-cifilter-like) – Daniel Apr 19 '16 at 14:03

0 Answers0