|
TNB Library
|
ビットマップポータブルフォーマットクラス. [詳解]
#include <TnbBitmapPortableFormat.h>
公開型 | |
| enum | EDescriptor { P1 , P2 , P3 , P4 , P5 , P6 } |
| 種類 [詳解] | |
公開メンバ関数 | |
| CBitmapImage & | Bitmap (void) |
| [参照] 画像参照. [詳解] | |
| EDescriptor | GetLastDescriptor (void) const |
| [取得] 最終設定種類取得. [詳解] | |
| bool | Load (LPCTSTR lpszFileName) |
| [設定] ファイル読込み. [詳解] | |
| bool | Save (LPCTSTR lpszFileName, EDescriptor desc, DWORD prm, LPCTSTR lpszComment=NULL) const |
| [保存] ファイル書き込み. [詳解] | |
| bool | Set (size_t size, LPCVOID pData) |
| [設定] 設定. [詳解] | |
| CByteVector | ToVector (EDescriptor desc, DWORD prm, LPCTSTR lpszComment=NULL) const |
| [変換] バイナリ変換. [詳解] | |
ビットマップポータブルフォーマットクラス.
PNM (Portable aNyMap 形式、Netpbm形式) 画像形式の作成(書き込み)、 および解析(読み込み)をサポートしています。
16bitは未対応。8bitのみ対応しています。
読み込み時、区切り文字はスペースか改行に限定されています。
TnbBitmapPortableFormat.h の 38 行目に定義があります。
| enum EDescriptor |
種類
| 列挙値 | |
|---|---|
| P1 | Portable BitMap ASCII (.PBM) |
| P2 | Portable GrayMap ASCII (.PGM) |
| P3 | Portable PixMap ASCII (.PPM) |
| P4 | Portable BitMap Binary (.PBM) |
| P5 | Portable GrayMap Binary (.PGM) |
| P6 | Portable PixMap Binary (.PPM) |
TnbBitmapPortableFormat.h の 43 行目に定義があります。
| CBitmapImage & Bitmap | ( | void | ) |
| EDescriptor GetLastDescriptor | ( | void | ) | const |
| bool Load | ( | LPCTSTR | lpszFileName | ) |
[設定] ファイル読込み.
指定のファイルを読み込み、本インスタンスに24bitカラーで記憶します。
| lpszFileName | ファイル名 |
| true | 成功。種類は GetLastDescriptor() で知ることが出来ます。 |
| false | 失敗 |
TnbBitmapPortableFormat.h の 371 行目に定義があります。
| bool Save | ( | LPCTSTR | lpszFileName, |
| EDescriptor | desc, | ||
| DWORD | prm, | ||
| LPCTSTR | lpszComment = NULL |
||
| ) | const |
[保存] ファイル書き込み.
本インスタンスに記憶している画像を指定の種類で指定のファイルへ書き込みます。
| lpszFileName | ファイル名 |
| desc | 種類 |
| prm | パラメータ。 種類が P1,P4 の場合「敷居値」、その他の種類の場合「色スケールの最大値」を指定します。 |
| lpszComment | コメント。 |
| true | 成功 |
| false | 失敗 |
TnbBitmapPortableFormat.h の 571 行目に定義があります。
| bool Set | ( | size_t | size, |
| LPCVOID | pData | ||
| ) |
[設定] 設定.
指定のデータを読み込み、本インスタンスに24bitカラーで記憶します。バイナリ、テキストともにOKです。
| size | データサイズ |
| pData | データ |
| true | 成功。種類は GetLastDescriptor() で知ることが出来ます。 |
| false | 失敗 |
TnbBitmapPortableFormat.h の 71 行目に定義があります。
| CByteVector ToVector | ( | EDescriptor | desc, |
| DWORD | prm, | ||
| LPCTSTR | lpszComment = NULL |
||
| ) | const |
[変換] バイナリ変換.
| desc | 種類 |
| prm | パラメータ。 種類が P1,P4 の場合「敷居値」、その他の種類の場合「色スケールの最大値」を指定します。 |
TnbBitmapPortableFormat.h の 388 行目に定義があります。