Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone - Manipulating/Editing & Saving Images (High Res)
    primarykey
    data
    text
    <p>In the app i'm working on I have a section where I let users load in an image using UIImagePicker (either from their photo library or taking a new picture), doing so usually gives a big image resolution..2500x2000 (or something similar)</p> <p>Now i load that image into an UIImageView (lets just say 400x320). I then allow the user to select other images/objects to overlay ontop of the original image and move those around/resize them before they can either save the new picture to their Photo Library or email it.</p> <p>I was just wondering what the best way to save the image would be so that the image res is still as high as the original was....right now i'm just taking a screenshot but that leaves me with a small 400x320 image.</p> <p>Thanks!</p> <hr> <p>So i got what i wanted, not sure if i did it the correct way or not.</p> <p>Here's basically what i did.</p> <pre><code>//NEWWIDTH and NEWHEIGHT are double the width and height of the UIImageView that i can edit the pictures in CGSize newSize = CGSizeMake(NEWWIDTH, NEWHEIGHT); UIGraphicsBeginImageContext(newSize); //i'm resizing myOriginalImage before to how i want [myOriginalImage drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)]; UIImage *image; //Here i go through all the other pictures i added on top and go the same drawInRect method for each of them...multiplying each value x,y,height,width by 2 UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return newImage; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload