0

I have a feature, I want to take a screenshot of a UIView(called "arrangeView" in my codes). and send the picture to my server, and then I will print it, so I want a high quantity picture..

My codes:

 UIGraphicsBeginImageContext(arrangeView.frame.size);
    [arrangeView.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
    //save and send method
    [self saveImage:newImage WithName:imgTitle];

With these codes I have 2 issues:

  1. the picture quality is too low. because after I uploaded to the server, I will print it. but the picture I got with the codes only 20~40k, it is too small to print.

  2. one friend told me that the app store don't alow app take a screenshot and send it to the server. he told me to use bitmap.

And I searched in google, I don't find a good solution for it. Would someone help?

Thank you very much.

yang wang
  • 9
  • 3

1 Answers1

1

Screen shot you get will be of same resolution as you main screen size i.e If it is iPhone 5s it will be 640 x 1136. Best way to get screen shot is:

UIView *screenShotView = [arrangeView snapshotViewAfterScreenUpdates:YES];

sschunara
  • 2,285
  • 22
  • 31