-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imageWithPerspectiveCorrectionFromQuad scale problem. #37
Comments
Yep, I know that's a problem on the API level of our framework. Pull requests are welcome. |
Sorry for the delay btw. I've been sick lately and haven't had the energy to do much. |
No worries! I hope you feel better now.
|
Thank you! It may take some time to recover. Anyways if you are eager to do this and want even better result we could throw our handwritten resampler ( Remember many people rely on the API so it is wise to mark public methods deprecated. That way we don't need to create a 2.x version of this framework. I like this way of deprecating https://github.com/ReactiveCocoa/ReactiveCocoa/blob/v2.5/ReactiveCocoa/RACSignal.h#L213-L219 |
Hey, take you time. No job worth to steal your health (except for a male porn star perhaps :) ).
|
😂 Hm. Interesting. |
Well, yeah. But any anti-aliasing would kill the performance. Probably Accelerate framework will help or some ideas from OpenCV methods.
|
I noticed an issue with UIImage scale and "imageWithPerspectiveCorrectionFromQuad". If I pass an image with scale factor 3.0f (iPhone6 Plus) it crops only portion of an image. As far as I traced the rects it appears to act weird here:
(Line 164:) UIImage *correctedImage = [self imageWithTransform:transform anchorPoint:CGPointZero];
(Line 165:) UIImage *resultImage = [correctedImage imageByCroppingToRect:destinationRect];
Here, imageWithTransform returns an image with scale 1.0f (so its size in points = size in pixels) and destinationRect is still in points. So the result image is 1/3 upper part of the source image.
Of course, you can always transform your @3x image into @1x by drawing it to image context with scale 1.0 and triple source size. However in situation where you're really low on available memory this could be a hussle.
The text was updated successfully, but these errors were encountered: