2014年5月31日土曜日

画像関係の用語の整理(UIImage、NSImage、CGImage、CGImageRef)



整理できてないけどね。

画像関係でいろいろなFW・クラスが登場するので軽く情報収集。
まあよくわかりませんな。iOSはほんと内部でFWがバラバラなのでわけわからん。
自分がよくわかってないだけで実は非常に合理的な設計だったりするんだろうか。




【UIImage】
 Framework /System/Library/Frameworks/UIKit.framework https://developer.apple.com/library/ios/documentation/uikit/reference/UIImage_Class/Reference/Reference.html
A UIImage object is a high-level way to display image data. Image objects are immutable, so you cannot change their properties after creation.

【NSImage】
 macで使うものでiOSでは使わないんじゃね?
Framework /System/Library/Frameworks/AppKit.framework
 The NSImage class is a high-level interface for manipulating image data. You use instances of this class to load existing images, create new images, and draw the resulting image data into your views. Although you use this class predominantly for image-related operations, the class itself knows little about the underlying image data. Instead, it works in conjunction with one or more image representation objects (subclasses of NSImageRep) to manage and render the image data. For the most part, these interactions are transparent. 
NSImageクラスはは画像データ操作の高度なインタフェースです。 このクラスのインスタンスを画像の読み込みや新規作成や描画結果のviewへの書き込みに使えます。 このクラスは画像に関わる操作に圧倒的ですが、画像データの基礎知識に乏しいです? サブクラスのNSImageRepあるからそっち使ってね。 イミフ。

【CGImage】
  Framework ApplicationServices/ApplicationServices.h https://developer.apple.com/library/ios/documentation/graphicsimaging/Reference/CGImage/Reference/reference.html
The CGImageRef opaque type represents bitmap images and bitmap image masks, based on sample data that you supply.
 CGImageRef 不透明型は あなたの提供した ビットマップ画像やビットマップ画像マスク を 表す CGImageはCGImageRefだよ、でいいのか

【CGImageRef】
An opaque type that encapsulates bitmap image information 
「ビットマップ画像情報を内包した不透明型です」
ヘッダで定義したフォーマットの型をOpaqueにして構造体定義を実装側によせると直しやすいよ!ということらしい
http://d.hatena.ne.jp/white_wheels/20110817/p3


後半に続く

0 件のコメント:

コメントを投稿