次の方法で共有


Image 関数

Windows GDI+ は、約 600 個の関数で構成されるフラット API を公開しています。これは、Gdiplus.dll で実装され、Gdiplusflat.h で宣言されています。 GDI+ フラット API の関数は、約 40 個の C++ クラスのコレクションによってラップされます。 フラット API で関数を直接呼び出さないでください。 GDI+ を呼び出す場合は常に、C++ ラッパーによって提供されるメソッドと関数を呼び出すことで行う必要があります。 Microsoft 製品サポート サービスは、フラット API を直接呼び出すコードのサポートを提供しません。 これらのラッパー メソッドの使用方法の詳細については、「GDI+ Flat API を参照してください。

次のフラット API 関数は、Image C++ クラスによってラップされます。

HatchBrush 関数と対応するラッパー メソッド

フラット関数 ラッパー メソッド 備考
GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* ストリーム、GpImage **イメージ)
Image::Image(IN IStream* ストリーム, IN BOOL useEmbeddedColorManagement) ストリームに基づいて Image オブジェクトを作成します。
このフラット関数では、イメージ カラー管理 (ICM) は使用されません。
GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR* ファイル名、GpImage **イメージ)
Image::Image(IN const WCHAR* ファイル名, IN BOOL useEmbeddedColorManagement) ファイルに基づいて Image オブジェクトを作成します。
このフラット関数では ICM は使用されません。
GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream* ストリーム、GpImage **画像)
Image::Image(IN IStream* ストリーム, IN BOOL useEmbeddedColorManagement) ストリームに基づいて Image オブジェクトを作成します。
このフラット関数では ICM は使用されません。
GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR* ファイル名, GpImage **イメージ)
Image::Image(IN const WCHAR* ファイル名, IN BOOL useEmbeddedColorManagement) ファイルに基づいて Image オブジェクトを作成します。
このフラット関数では ICM は使用されません。
GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
Image* Image::Clone() 新しい Image オブジェクトを作成し、この Image オブジェクトの内容で初期化します。
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *画像)
Image::~Image()
Image オブジェクトによって使用されるリソースを解放します。
GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage *画像, GDIPCONST WCHAR* ファイル名, GDIPCONST CLSID* clsidEncoder, GDIPCONST EncoderParameters* encoderParams)
ステータス Image::Save( IN const WCHAR* filename, IN const CLSID* clsidEncoder, IN const EncoderParameters *encoderParams ) このイメージをファイルに保存します。
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *画像, IStream* ストリーム, GDIPCONST CLSID* clsidEncoder, GDIPCONST EncoderParameters* encoderParams)
ステータス Image::Save( IN IStream* ストリーム, IN const CLSID* clsidEncoder, IN const EncoderParameters *encoderParams ) このイメージをストリームに保存します。
GpStatus WINGDIPAPI GdipSaveAdd(GpImage *image, GDIPCONST EncoderParameters* encoderParams)
ステータス Image::SaveAdd( IN const EncoderParameters *encoderParams ) Save メソッドの前の呼び出しで指定したファイルまたはストリームにフレームを追加します。 選択したフレームを複数フレーム イメージから別の複数フレーム イメージに保存するには、このメソッドを使用します。
GpStatus WINGDIPAPI GdipSaveAddImage(GpImage *image, GpImage* newImage, GDIPCONST EncoderParameters* encoderParams)
ステータス Image::SaveAdd( IN Image* newImage, IN const EncoderParameters *encoderParams ) Save メソッドの前の呼び出しで指定したファイルまたはストリームにフレームを追加します。
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics)
Graphics::Graphics(IN Image* image) Image オブジェクトに関連付けられた Graphics オブジェクトを作成します。
GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit)
ステータス Image::GetBounds( OUT RectF *srcRect, OUT Unit *srcUnit ) このイメージの外接する四角形を取得します。
GpStatus WINGDIPAPI GdipGetImageDimension(GpImage *image, REAL *width, REAL *height)
状態イメージ::GetPhysicalDimension( OUT SizeF* size ) このイメージの幅と高さを取得します。
フラット関数では、の幅の高さ パラメーターは、ラッパー メソッドの サイズ パラメーターに対応します。
GpStatus WINGDIPAPI GdipGetImageType(GpImage *image, ImageType *type)
ImageType Image::GetType() 定数 この Image オブジェクトの型 (ビットマップまたはメタファイル) を取得します。
GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
UINTイメージ::GetWidth() この画像の幅 (ピクセル単位) を取得します。
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
UINT イメージ::GetHeight() この画像の画像の高さをピクセル単位で取得します。
GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage *image, REAL *解像度)
実際の画像::GetHorizontalResolution() この画像の水平方向の解像度 (1 インチあたりのドット数) を取得します。
GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage *画像, REAL *解像度)
実際の画像::GetVerticalResolution() この画像の垂直方向の解像度 (1 インチあたりのドット数) を取得します。
GpStatus WINGDIPAPI GdipGetImageFlags(GpImage *image, UINT *flags)
UINT イメージ::GetFlags() この Image オブジェクトの特定の属性を示すフラグのセットを取得します。
GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage *image, GUID *format)
状態イメージ::GetRawFormat(OUT GUID *format) この Image オブジェクトの形式を識別するグローバル一意識別子 (GUID) を取得します。 さまざまなファイル形式を識別する GUID は、Gdiplusimaging.h で定義されます。
GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage *image, PixelFormat *format)
PixelFormat Image::GetPixelFormat() この Image オブジェクトのピクセル形式を取得します。
GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage *image, UINT thumbWidth, UINT thumbHeight, GpImage **thumbImage, GetThumbnailImageAbort コールバック, VOID * callbackData)
Image* Image::GetThumbnailImage( IN UINT thumbWidth, IN UINT thumbHeight, IN GetThumbnailImageAbort コールバック, IN VOID* callbackData ) この Image オブジェクトからサムネイル画像を取得します。
GpStatus WINGDIPAPI GdipGetEncoderParameterListSize(GpImage *画像, GDIPCONST CLSID* clsidEncoder, UINT* サイズ)
UINT Image::GetEncoderParameterListSize( IN const CLSID* clsidEncoder ) 指定したイメージ エンコーダーのパラメーター リストのサイズ (バイト単位) を取得します。
GpStatus WINGDIPAPI GdipGetEncoderParameterList(GpImage *image, GDIPCONST CLSID* clsidEncoder, UINT size, EncoderParameters* buffer)
ステータス Image::GetEncoderParameterList( IN const CLSID* clsidEncoder, IN UINT size, OUT EncoderParameters* buffer ) 指定したイメージ エンコーダーでサポートされているパラメーターの一覧を取得します。
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage* 画像, UINT* カウント)
UINT Image::GetFrameDimensionsCount() この Image オブジェクト内のフレーム ディメンションの数を取得します。
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage* image, GUID* dimensionIDs, UINT count)
ステータス Image::GetFrameDimensionsList( OUT GUID* dimensionIDs, IN UINT count ) この Image オブジェクトのフレーム ディメンションの識別子を取得します。
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *画像, GDIPCONST GUID* dimensionID, UINT* カウント)
UINT Image::GetFrameCount( IN const GUID* dimensionID ) この Image オブジェクトの指定した次元のフレーム数を取得します。
GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage *image, GDIPCONST GUID* dimensionID, UINT frameIndex)
ステータス Image::SelectActiveFrame( IN const GUID *dimensionID, IN UINT frameIndex ) ディメンションとインデックスで指定されたこの Image オブジェクト内のフレームを選択します。
GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage *image, RotateFlipType rfType)
ステータス画像::RotateFlip( IN RotateFlipType rotateFlipType ) このイメージを回転および反転します。
GpStatus WINGDIPAPI GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size)
状態イメージ::GetPalette( OUT ColorPalette *palette, IN INT size ) この Image オブジェクトの ColorPalette を取得します。
GpStatus WINGDIPAPI GdipSetImagePalette(GpImage *image, GDIPCONST ColorPalette *palette)
状態イメージ::SetPalette( IN const ColorPalette *palette ) この Image オブジェクトのカラー パレットを設定します。
GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *サイズ)
INT イメージ::GetPaletteSize() この Image オブジェクトのカラー パレットのサイズ (バイト単位) を取得します。
GpStatus WINGDIPAPI GdipGetPropertyCount(GpImage *image, UINT* numOfProperty)
UINT イメージ::GetPropertyCount() この Image オブジェクトに格納されているプロパティの数を取得します。
GpStatus WINGDIPAPI GdipGetPropertyIdList(GpImage *image, UINT numOfProperty, PROPID* list)
ステータス Image::GetPropertyIdList( IN UINT numOfProperty, OUT PROPID* list ) この Image オブジェクトのメタデータで使用されるプロパティ識別子の一覧を取得します。
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage *image, PROPID propId, UINT* size)
UINT Image::GetPropertyItemSize( IN PROPID propId ) この Image オブジェクトの指定したプロパティ項目のサイズ (バイト単位) を取得します。
GpStatus WINGDIPAPI GdipGetPropertyItem(GpImage *image, PROPID propId,UINT propSize, PropertyItem* buffer)
ステータス Image::GetPropertyItem( IN PROPID propId, IN UINT propSize, OUT PropertyItem* buffer ) この Image オブジェクトから、指定したプロパティ項目 (メタデータの一部) を取得します。
GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT* totalBufferSize, UINT* numProperties)
ステータス Image::GetPropertySize( OUT UINT* totalBufferSize, OUT UINT* numProperties ) この Image オブジェクトに格納されているすべてのプロパティ項目の合計サイズ (バイト単位) を取得します。 このメソッドは、この Image オブジェクトに格納されているプロパティ項目の数も取得します。
GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT totalBufferSize, UINT numProperties, PropertyItem* allItems)
ステータス Image::GetAllPropertyItems( IN UINT totalBufferSize, IN UINT numProperties, OUT PropertyItem* allItems ) この Image オブジェクトに格納されているすべてのプロパティ項目 (メタデータ) を取得します。
GpStatus WINGDIPAPI GdipRemovePropertyItem(GpImage *image, PROPID propId)
ステータス Image::RemovePropertyItem( IN PROPID propId ) この Image オブジェクトからプロパティ項目 (メタデータの一部) を削除します。
GpStatus WINGDIPAPI GdipSetPropertyItem(GpImage *画像, GDIPCONST PropertyItem* アイテム)
状態イメージ::SetPropertyItem この Image オブジェクトのプロパティ項目 (メタデータの一部) を設定します。 項目が既に存在する場合は、その内容が更新されます。それ以外の場合は、新しい項目が追加されます。
GpStatus WINGDIPAPI GdipFindFirstImageItem(GpImage *画像, ImageItemData* 項目)
ステータス Image::FindFirstItem( IN ImageItemData* item ) この Image オブジェクトの最初のメタデータ 項目の説明とデータ サイズを取得します。
GpStatus WINGDIPAPI GdipFindNextImageItem(GpImage *画像, ImageItemData* 項目)
ステータス Image::FindNextItem( IN ImageItemData* item ) この Image オブジェクト内の次のメタデータ 項目の説明とデータ サイズを取得します。 このメソッドは、Image::FindFirstItem メソッドと共に使用され、この ImImageage オブジェクトに格納されているメタデータ項目を列挙します。
GpStatus WINGDIPAPI GdipGetImageItemData(GpImage *画像, ImageItemData* 項目)
ステータス Image::GetItemData( IN ImageItemData* item ) この Image オブジェクトから 1 つのメタデータを取得します。
GpStatus WINGDIPAPI GdipImageSetAbort(GpImage *pImage, GdiplusAbort *pIAbort)
状態イメージ::SetAbort( GdiplusAbort *pIAbort ) 時間のかかるレンダリング操作中に Abort メソッドが定期的に呼び出されるオブジェクトを設定します。
GpStatus WINGDIPAPI GdipConvertToEmfPlus(const GpGraphics* refGraphics, GpMetafile* metafile, BOOL* conversionSuccess, EmfType emfType, const WCHAR* 説明, GpMetafile** out_metafile)
ステータス Metafile::ConvertToEmfPlus( const Graphics* refGraphics, BOOL* conversionSuccess, EmfType emfType, const WCHAR* description ) この Metafile オブジェクトを EMF+ 形式に変換します。
GpStatus WINGDIPAPI GdipConvertToEmfPlusToFile(const GpGraphics* refGraphics, GpMetafile* メタファイル, BOOL* conversionSuccess, const WCHAR* ファイル名, EmfType emfType, const WCHAR* 説明, GpMetafile** out_metafile)
ステータス Metafile::ConvertToEmfPlus( const Graphics* refGraphics, const WCHAR* filename, BOOL* conversionSuccess, EmfType emfType, const WCHAR* description ) この Metafile オブジェクトを EMF+ 形式に変換します。
GpStatus WINGDIPAPI GdipConvertToEmfPlusToStream(const GpGraphics* refGraphics, GpMetafile* メタファイル, BOOL* conversionSuccess, IStream* ストリーム, EmfType emfType, const WCHAR* 説明, GpMetafile** out_metafile)
ステータス Metafile::ConvertToEmfPlus( const Graphics* refGraphics, IStream* stream, BOOL* conversionSuccess, EmfType emfType, const WCHAR* description ) この Metafile オブジェクトを EMF+ 形式に変換します。
GpStatus WINGDIPAPI GdipImageForceValidation(GpImage *画像)
ラッパー メソッドによって呼び出されません。
この関数は、イメージの検証を強制します。