) 2013/7/27 iphone

Similar documents
) CoreImage 2013/5/25 iphone

ハーモニカと7日間の妖精

homes01_P _chousa_sai.indd

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

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

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

FX ) 2

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



920P-1



広報しもつけp01ol

ONPRESS190

本文(B5×40)0614三校責了.indd

プリント

第4回報告書.PDF


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

untitled

1


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

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

bc0710_010_015.indd


プログラミング基礎

Swiftではじめる iPhoneアプリ開発の教科書 【iOS 8&Xcode 6対応】初版第2刷差分


Java updated

1

2ECS9C4_P0.indd

P03.ppt


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

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


橡計画0.PDF

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

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


sp2-2.indd

VB.NETコーディング標準

untitled

c2

プログラミングA

P01.ai

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

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


Smalltalk_

2 Help

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

NPCA部誌2018


Quick Sort 計算機アルゴリズム特論 :2017 年度 只木進一

新・明解Java入門

解きながら学ぶJava入門編


r03.dvi

bitvisor-ipc v12b.key

index View Controller

第1章

日 用 用 面 示 用 用 方


_後藤光男.indd

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

ohp03.dvi

JavaScript演習



BN41.indd

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

kiso2-06.key

BN46.indd

ÿþ

24,828,330 Contents 9,931,332 8,223,840 3,436,978 9,931,332 7,674,406 3,413,724 2,985,287 1

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

Microsoft PowerPoint - WRR-celinux-upload 1.ppt

Q&A目次.PDF

Prog1_6th

Oracle ESB レッスン03: ESB CustomerData SOAP

…i…J…‹†QŁ\1/4

2

untitled

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

2

aeronca_537_color.indd


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

r08.dvi

津島JC講演会.PDF

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