If I have a image size 1024*768, but I want to show a 100*100 square located on 200, 200. What is the simplest way to do it? Thz u.
            Asked
            
        
        
            Active
            
        
            Viewed 273 times
        
    1 Answers
3
            You're basically talking about a "Crop" operation.
From HitScan in this question:
CGImageRef imageRef = CGImageCreateWithImageInRect([largeImage CGImage], cropRect);
// or use the UIImage wherever you like
[UIImageView setImage:[UIImage imageWithCGImage:imageRef]]; 
CGImageRelease(imageRef);
 
    
    
        Community
        
- 1
- 1
 
    
    
        jessecurry
        
- 22,068
- 8
- 52
- 44
