macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

NSBitmapImageRepクラス

INDEX>AppKit>NSBitmapImageRep

ビットマップ画像のクラス
継承 NSObject
準拠 NSObject (NSObject)
フレームワーク /System/Library/Frameworks/AppKit.framework
使用可能 OS X 10.0以降
定義
インポート文 @import AppKit;

developer.apple.com

概要

ビットマップ画像のクラスです。
ピクセルデータを直接操作する場合に使用します。


ViewからNSBitmapImageRepを作成する場合は NSViewのcacheDisplayInRect: を使用します。
Swift

//Bitmapデータ作成
        let theBitmap = aView002?.bitmapImageRepForCachingDisplayInRect(aView002!.bounds)
        aView002!.cacheDisplayInRect(aView002!.bounds, toBitmapImageRep: theBitmap! )

メソッドとプロパティ

画像についての情報の取得

-bitmapFormat
bitsPerPixel
bytesPerPlane
bytesPerRow
isPlanar (OS X v10.0 〜 OS X v10.9)
numberOfPlanes
samplesPerPixel

画像データの取得

bitmapData
getBitmapDataPlanes:

コアイメージ画像の取得

CGImage

カラースペースの管理

bitmapImageRepByConvertingToColorSpace:renderingIntent:
bitmapImageRepByRetaggingWithColorSpace:
colorSpace

データタイプ

NSBitmapImageFileType
NSTIFFCompression
NSBitmapFormat

定数

NSImageRepLoadStatus
Bitmap image properties

参照

関連サイト(外部サイト)

umap.net

Error diffusionError diffusion - Wikipedia, the free encyclopedia