I was wondering which method is the best when there is a need to scale images?
Do you have benchmarks on this?
Thanks in advance.
Regards,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Internally,
-drawInRect:will rotate the image into the correct orientation according to theimageOrientationproperty, then flip the image upside down to convert UIKit coordinates into CoreGraphics coordinates.Then it will call
CGContextDrawImage.In this sense,
-drawInRect:is surely slower. But usingCGContextDrawImageto target UIKit requires one to do the transformation hassles which may not worth for maintenance.