Skip to content

Instantly share code, notes, and snippets.

@jamespenguin
Created January 7, 2013 05:10
Show Gist options
  • Save jamespenguin/4472553 to your computer and use it in GitHub Desktop.
Save jamespenguin/4472553 to your computer and use it in GitHub Desktop.
int x, y, width, height;
x = cardImage.size.width * 0.09; // 14% of the card image's width
y = cardImage.size.height * 0.05; // 8.5% of the card image's height
width = cardImage.size.width * 0.83; // 61.5% of the card image's width
height = cardImage.size.height * 0.85; // 7% of the card image's height
CGRect name_crop_rect = CGRectMake(x, y, width, height);
UIImage *name_image = [cardImage croppedImage:name_crop_rect];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment