0

Images taken with our device camera's are larger than the screen on our iOS device. Usually when we render an image in iOS i see people setting their rendering size to the size of the main view or their image view.

As shown in this stack overflow response.

Doing so will make the image smaller and lower quality.

If the logic follows.

Would it be possible to render the image with it's full size if I make the image view go beyond the device screen. In other words the image view will be set to the size of the original full sized image.

Will doing this generate a rendered image with the same pixel size of the original image ?


What have I done so far ? I have tested other image overlaying/editing apps and they seem to reduce the image's pixel size. I used the methods provided in the link above and they also do the same.

3366784
  • 1,973
  • 1
  • 12
  • 23

1 Answers1

0

Yes it's definitely possible by embedding a UIImageView in a UIScrollView and using sizeToFit:

imageView.image = image;
[imageView sizeToFit]; 
scrollView.contentSize = image.size;

You will then be able to pan across the image within the scroll view.

jspcal
  • 47,335
  • 4
  • 66
  • 68
  • Ok, will test this out. I'm personally not going to use a scroll view because i don't want the user to see a blown up image. I just want to generate an image that is as high quality as possible. Will mark this as correct as soon as I test it. – 3366784 Jul 06 '18 at 20:24