Reply:
Recently a post made a similar, no additional rotation ⋯ ⋯
Useful on looking through
Reply:
Can not find the words to tell my mailbox
Reply:
ljp8817@gmail.com
Reply:
Lest someone say I'm not authentic, affixed core code
- (Void) touchesMoved: (NSSet *) touches withEvent: (UIEvent *) event
{
UITouch * touch = [touches anyObject];
CGPoint currentPoint = [touch locationInView: self];
CGRect rect = CGRectMake (currentPoint.x +3, currentPoint.y +3, v.bounds.size.width, v.bounds.size.height);
v.frame = rect;
v.image = [self createRectImage: pubImg rect: rect];
[V setNeedsDisplay];
}
- (UIImage *) createRectImage: (UIImage *) image rect: (CGRect) rect
{
/ / The size of CGContextRef
CGImageRef imageRef = CGImageCreateWithImageInRect ([image CGImage], rect);
UIImage * elementImage = [UIImage imageWithCGImage: imageRef];
return elementImage;
}
Reply:
Yesterday, I do a good job, you can cut the picture, but the rotation, then allowed to cut the picture ~ ~
seeking expert answers
For image processing (to get a picture of the part) may be one with the following code:
UIImage * image = [UIImage imageNamed: filename];
CGImageRef imageRef = image.CGImage;
CGRect rect = CGRectMake (origin.x, origin.y, size.width, size.height);
CGImageRef imageRefRect = CGImageCreateWithImageInRect (imageRef, rect);
UIImage * imageRect = [[UIImage alloc] initWithCGImage: imageRefRect];
The current view as to save photos to the album:
# Import
UIGraphicsBeginImageContext (currentView.bounds.size); / / currentView current view
[CurrentView.layer renderInContext: UIGraphicsGetCurrentContext ()];
UIImage * viewImage = UIGraphicsGetImageFromCurrentImageContext ();
UIGraphicsEndImageContext ();
UIImageWriteToSavedPhotosAlbum (viewImage, nil, nil, nil);
So UIimageView image rotation:
float rotateAngle = M_PI;
CGAffineTransform transform = CGAffineTransformMakeRotation (rotateAngle);
imageView.transform = transform;
Reply:
There is no way to make a uiview uiimageview and an overlap region for processing. . . .
Reply:
No comments:
Post a Comment