Skip to content

Instantly share code, notes, and snippets.

View ar-tama's full-sized avatar

Makoto Arata ar-tama

View GitHub Profile
@Cside
Cside / .replyrc
Last active August 29, 2015 13:56
script_line1 = use strict
script_line2 = use warnings
[Interrupt]
[FancyPrompt]
[DataDumper]
[Colors]
[ReadLine]
[Hints]
[Packages]
-(UIImage*)image:(UIImage*)image scaleAndRotateImageToMaxResolution:(int)resolution
{
int kMaxResolution = resolution; // Or whatever
CGImageRef imgRef = image.CGImage;
CGFloat width = CGImageGetWidth(imgRef);
CGFloat height = CGImageGetHeight(imgRef);