) 2013/7/27 iphone

Similar documents
homes01_P _chousa_sai.indd

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Microsoft PowerPoint _秀英体の取組み素材(予稿集).ppt

FX自己アフリエイトマニュアル

FX ) 2

サービス付き高齢者向け住宅賠償責任保険.indd


広報しもつけp01ol

ONPRESS190

プリント


iOSにおける描画と印刷のガイド (TP )

untitled


£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

Java演習(4) -- 変数と型 --

bc0710_010_015.indd

Java updated

1

P03.ppt


P.37 P.816 P.17 P.1819 contents 1 2

福祉用具シリーズVol.15_腰痛予防編.indd


橡計画0.PDF

manu_fi„‰ž½À°_‚““⁄ÊßÝÌ_‘oŠÍ

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç


VB.NETコーディング標準

untitled

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

:30 12:00 I. I VI II. III. IV. a d V. VI

Smalltalk_

8 if switch for while do while 2


経済産業省 地域金融人材育成システム開発事業

Condition DAQ condition condition 2 3 XML key value

programmingII2019-v01

CodeIgniter Con 2011, Tokyo Japan, February

新・明解Java入門

解きながら学ぶJava入門編


r03.dvi

bitvisor-ipc v12b.key

index View Controller

JavaScript 1.! DOM Ajax Shelley Powers,, JavaScript David Flanagan, JavaScript 2

ohp03.dvi

JavaScript演習



Catalyst 3560-C and 2960-C Getting Started Guide (Japanese)

kiso2-06.key

ÿþ

(Eclipse\202\305\212w\202\324Java2\215\374.pdf)

Microsoft PowerPoint - WRR-celinux-upload 1.ppt

Q&A目次.PDF

untitled

アルゴリズムとデータ構造1


KeyListener init addkeylistener addactionlistener addkeylistener addkeylistener( this ); this.addkeylistener( this ); KeyListener public void keytyped

r08.dvi

K227 Java 2

untitled

Transcription:

) 2013/7/27 iphone

DJ / : takatronix Facebook/Twitter/Skype/LINE/Weibo -> takatronix http://takatronix.com LEGO FX

SEXY SCAN... ( ) -

- http://sexymirror-app.com 2013/1 iphone

Objective-C Category( )

Objective-C

ViewController UIImage ( д )

.h @interface ( ) - @end.m @implementation ( ) - @end

UIImage

File->New->File...

http://takatronix.com/tutorial/20130525.zip http://takatronix.com/tutorial/20130727.zip

ViewController // -(UIImage*)monochromeFilter:(UIImage*)image{ // UIImage CoreImage CIImage* ciimage = [[CIImage alloc] initwithimage:image]; UIImage+Test.m // -(UIImage*)monochromeFilter{ // UIImage CoreImage CIImage* ciimage = [[CIImage alloc] initwithimage:self]; self( )

UIimage+Test.h @interface UIImage (Test) // -(UIImage*)monochromeFilter; // ) -(UIImage*)vignetteFilter; @end

ViewController ) imageview.image = [self monochromefilter:image]; UIImage imageview.image = [image monochromefilter];

-> _imageview.image = [[image monochromefilter] vignettefilter];

( )Context

UIImage -(UIImage*)resizedImage:(CGSize)size{ // UIGraphicsBeginImageContext(size); // ( [self drawinrect:cgrectmake(0,0,size.width,size.height)]; // UIImage UIImage* newimage = UIGraphicsGetImageFromCurrentImageContext(); // UIGraphicsEndImageContext(); } // return newimage ;

UIImage // -(UIImage*)cropImage:(CGRect)rect{ } CGImageRef imageref = CGImageCreateWithImageInRect([self CGImage], rect); UIImage *retimage = [UIImage imagewithcgimage:imageref]; CGImageRelease(imageRef); return retimage;

UIImage - (UIImage *)mirrorimage{ CGImageRef imgref = [self CGImage]; // UIGraphicsBeginImageContext(self.size); // CGContextRef context = UIGraphicsGetCurrentContext(); // X Y CGContextTranslateCTM( context, self.size.width, self.size.height); // CGContextScaleCTM( context, -1.0, -1.0); // CGContextDrawImage( context, CGRectMake( 0, 0, self.size.width, self.size.height), imgref); // UIImage *retimg = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } return retimg;

CoreGraphics Y

CTM 変換行列 (CTM : Current Transformation Matrix)

-(UIImage*)rotateImage:(int)angle{ CGImageRef imgref = [self CGImage]; CGContextRef context; // CTM switch (angle) { case 90: UIGraphicsBeginImageContext(CGSizeMake(self.size.height, self.size.width)); context = UIGraphicsGetCurrentContext(); CGContextTranslateCTM(context, self.size.height, self.size.width); CGContextScaleCTM(context, 1.0, -1.0); CGContextRotateCTM(context, M_PI/2.0); break; case 180: UIGraphicsBeginImageContext(CGSizeMake(self.size.width, self.size.height)); context = UIGraphicsGetCurrentContext(); CGContextTranslateCTM(context, self.size.width, 0); CGContextScaleCTM(context, 1.0, -1.0); CGContextRotateCTM(context, -M_PI); break; case 270: UIGraphicsBeginImageContext(CGSizeMake(self.size.height, self.size.width)); context = UIGraphicsGetCurrentContext(); CGContextScaleCTM(context, 1.0, -1.0); CGContextRotateCTM(context, -M_PI/2.0); break; default: return self; } // ->UIImage CGContextDrawImage(context, CGRectMake(0, 0, self.size.width, self.size.height), imgref); UIImage *retimage = UIGraphicsGetImageFromCurrentImageContext(); } UIGraphicsEndImageContext(); return retimage;

http://takatronix.com/tutorial/20130727.zip

takatronix http://takatronix.com

takatronix http://takatronix.com