UIGraphicsBeginImageContext(scale_rect.size);
[self drawInRect: scale_rect];
CGContext will always round to ceiling - trying to hold all drawings.
That means: scale_rect.size.width == 320.00000031 will be rounded to 321. If your app care that 1 point, it’ll cause error.
[self drawInRect: scale_rect];
UIImage * thumbnail = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();CGContext will always round to ceiling - trying to hold all drawings.
That means: scale_rect.size.width == 320.00000031 will be rounded to 321. If your app care that 1 point, it’ll cause error.