Inherited by CRdBitmap, and CRdBitmap.
Public Member Functions | |
| HRESULT | Clear (void) |
| HRESULT | Create ([in] RtDWORD nWidth,[in] RtDWORD nHeight,[in] RtPixelFormat PixelFormat) |
| HRESULT | ConvertFormat ([in] RtPixelFormat pFormat) |
| HRESULT | GetHeader ([out] RtDWORD *pdwWidth,[out] RtDWORD *pdwHeight,[out] RtPixelFormat *pFormat) |
| HRESULT | GetFormatDesc ([out] RtPixelFormatDesc *pDesc) |
| HRESULT | GetSizeX ([out, retval] RtDWORD *pOut) |
| HRESULT | GetSizeY ([out, retval] RtDWORD *pOut) |
| HRESULT | GetFormatString ([out, retval] BSTR *pOut) |
| HRESULT | GetFormat ([out, retval] RtPixelFormat *pOut) |
| HRESULT | GetFormatNumberFromString ([in] BSTR bsFormat,[out, retval] RtPixelFormat *pOut) |
| HRESULT | GetFormatStringFromNumber ([in] RtPixelFormat Format,[out, retval] BSTR *pOut) |
| HRESULT | GetPixel ([in] RtDWORD dwPositionX,[in] RtDWORD dwPositionY,[in] IRdColor *pOutValue) |
| HRESULT | SetPixel ([in] RtDWORD dwPositionX,[in] RtDWORD dwPositionY,[in] IRdColor *pInValue) |
| HRESULT | GetPixelCOLORREF ([in] RtDWORD dwPositionX,[in] RtDWORD dwPositionY,[in] COLORREF *pOutValue) |
| HRESULT | GetPixelBuffer ([in] RtFlags dwFlags,[out] void **pBuffer) |
| HRESULT | CommitPixelBuffer ([in] void *pBuffer) |
| HRESULT | LockBitmap () |
| HRESULT | UnlockBitmap () |
| HRESULT | CreateDDBitmap ([in] HDC hDC,[out, retval] HBITMAP *pHBitmap) |
| HRESULT | CreateDDBitmapResized ([in] HDC hDC,[in] int sizeX,[in] int sizeY,[out, retval] HBITMAP *pHBitmap) |
| HRESULT | LoadFromFile ([in] BSTR FileName) |
| HRESULT | LoadFromResources ([in] HINSTANCE hInstance,[in]RtUlong dwResourceId) |
| HRESULT | GetFileName ([out, retval] BSTR *pFileName) |
| HRESULT | SetIsFromFile ([in] RtBool bIsFromFile,[in] BSTR bstrFileName) |
| HRESULT | SetHBitmap ([in] HBITMAP hBitmap) |
| HRESULT | SaveToFile ([in] RtBitmapFileFormat Format,[in] BSTR FileName) |
| HRESULT | SaveToFileEx ([in] RtBitmapFileFormat Format,[in] BSTR FileName) |
| HRESULT | Resize ([in] RtDWORD dwWidth,[in] RtDWORD dwHeight) |
| HRESULT | SetAdvancedFeature ([in] GUID FeatureID,[in] DWORD FeatureModifier,[in] VARIANT FeatureData) |
| HRESULT | GetAdvancedFeature ([in] GUID FeatureID,[out] DWORD *FeatureModifier,[out] VARIANT *FeatureData) |
| HRESULT | IsAdvancedFeatureSupported ([in] GUID FeatureID) |
| HRESULT | GetSupportedFormatCount ([out, retval] DWORD *dwFormatCount) |
| HRESULT | GetSupportedFormat ([in] DWORD dwFormat,[out] BSTR *bsMasks,[out] BSTR *bsFormatName) |
| HRESULT | IsEqual ([in] IRdBitmap *pBitmap,[out, retval] BOOL *bEqualityResult) |
| HRESULT | ImageSizeFromFile ([in]BSTR FileName,[out] DWORD *width,[out] DWORD *height) |
| HRESULT | GetDownsampledFlag ([out, retval] RtBool *pVal) |
| HRESULT | SetDownsampledFlag ([in] RtBool newVal) |
| HRESULT | SaveAsFileToStream ([in] IStream *pStream,[in] RtBitmapFileFormat format,[in] RtBool bSaveSizeToStream,[out, retval] RtDWORD *pdwSize) |
| HRESULT | LoadAsFileFromStream ([in] IStream *pStream,[in] RtDWORD dwSize) |
| HRESULT | CreateDIBitmap32 ([in] HDC hDC,[out, retval] HBITMAP *pHBitmap) |
| HRESULT | GrayscaleBitmap ([in] int iGrayPercent,[in] RtBool bPixelTransparent) |
| HRESULT | DrawBitmap ([in] HDC hDC,[in] int left,[in] int top,[in] RtBool bPixelTransparent) |
| HRESULT | GetAlphaBlendBitmap ([in] HDC hDC,[in] int left,[in] int top,[in] RtBool bPixelTransparent,[out, retval] HBITMAP *pHBitmap) |
| HRESULT | GetBitmapSize ([out] SIZE *pSize) |
| HRESULT | DrawBitmap32 ([in] HDC hDC,[in] int left,[in] int top,[in] RtBYTE bConsAlphaBlend,[in] RtBool bKeepVisible) |
| HRESULT IRdBitmap::Clear | ( | void | ) |
Clear all data in the bitmap.
| HRESULT IRdBitmap::Create | ( | [in] RtDWORD | nWidth, | |
| [in] RtDWORD | nHeight, | |||
| [in] RtPixelFormat | PixelFormat | |||
| ) |
Creates the internal buffers of the bitmap and prepares the bitmap for use.
| nWidth | [in] Specifies desired width of the bitmap. | |
| nHeight | [in] Specifies height of the bitmap. | |
| PixelFormat | [in] Specifies the pixel format of the bitmap. |
| E_INVALIDARG | for invalid dimensions or format. | |
| E_OUTOFMEMORY | if bitmap does not fit into the memory. |
| HRESULT IRdBitmap::ConvertFormat | ( | [in] RtPixelFormat | pFormat | ) |
Convert bitmap from one format to another.
| pFormat | [in] Specifies the new format of the bitmap. |
| E_FAIL | is returned if bitmap is empty. | |
| E_INVALIDARG | is returned if new format type is not valid. | |
| E_OUTOFMEMORY | is returned if new bitmap does not fit into the memory. |
| HRESULT IRdBitmap::GetHeader | ( | [out] RtDWORD * | pdwWidth, | |
| [out] RtDWORD * | pdwHeight, | |||
| [out] RtPixelFormat * | pFormat | |||
| ) |
Return the header information of the bitmap.
| pdwWidth | [out] Is filled with the width of the bitmap.
| |
| pdwHeight | [out] Is filled with the height of the bitmap.
| |
| pFormat | [out] Is filled with the format of the bitmap.
|
| HRESULT IRdBitmap::GetFormatDesc | ( | [out] RtPixelFormatDesc * | pDesc | ) |
Return the pixel format description.
| pDesc | [out] Is filled with the format description of the bitmap. |
| HRESULT IRdBitmap::GetSizeX | ( | [out, retval] RtDWORD * | pOut | ) |
Get the horizontal size.
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::GetSizeY | ( | [out, retval] RtDWORD * | pOut | ) |
Get the vertical size.
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::GetFormatString | ( | [out, retval] BSTR * | pOut | ) |
Get the pixel format in a string.
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::GetFormat | ( | [out, retval] RtPixelFormat * | pOut | ) |
Get the pixel format.
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::GetFormatNumberFromString | ( | [in] BSTR | bsFormat, | |
| [out, retval] RtPixelFormat * | pOut | |||
| ) |
Convert string format to the enumeration number.
| bsFormat | [in] Specifies the pixel format in the string. |
Standard HRESULT processing can be applied to the result.
| E_INVALIDARG | is returned for invalid format. |
| HRESULT IRdBitmap::GetFormatStringFromNumber | ( | [in] RtPixelFormat | Format, | |
| [out, retval] BSTR * | pOut | |||
| ) |
Get the pixel format string from a number.
| Format | [in] Specifies the pixel format in a number form. |
Standard HRESULT processing can be applied to the result.
| E_INVALIDARG | is returned for invalid format. |
| HRESULT IRdBitmap::GetPixel | ( | [in] RtDWORD | dwPositionX, | |
| [in] RtDWORD | dwPositionY, | |||
| [in] IRdColor * | pOutValue | |||
| ) |
Return pixel color at given position.
| dwPositionX | [in] Specifies the horizontal position of a pixel. | |
| dwPositionY | [in] Specifies the vertical position of a pixel. | |
| pOutValue | [in] Passed Color object is filled with color. |
| E_INVALIDARG | is returned for position out of bounds. | |
| E_FAIL | is returned also for unknown format and when lock failed. |
| HRESULT IRdBitmap::SetPixel | ( | [in] RtDWORD | dwPositionX, | |
| [in] RtDWORD | dwPositionY, | |||
| [in] IRdColor * | pInValue | |||
| ) |
Set pixel color at given position.
| dwPositionX | [in] Specifies the horizontal position of a pixel. | |
| dwPositionY | [in] Specifies the vertical position of a pixel. | |
| pInValue | [in] Specifies new color of the pixel. |
| E_INVALIDARG | is returned for position out of bounds. | |
| E_FAIL | is returned also for unknown format and when lock failed. |
| HRESULT IRdBitmap::GetPixelCOLORREF | ( | [in] RtDWORD | dwPositionX, | |
| [in] RtDWORD | dwPositionY, | |||
| [in] COLORREF * | pOutValue | |||
| ) |
Get/Return pixel at given position in the COLORREF format.
| dwPositionX | [in] Specifies the horizontal position of a pixel. | |
| dwPositionY | [in] Specifies the vertical position of a pixel. | |
| pOutValue | [in] Passed Color object is filled with color. |
| E_INVALIDARG | is returned for position out of bounds. | |
| E_FAIL | is returned also for unknown format and when lock failed. |
| HRESULT IRdBitmap::GetPixelBuffer | ( | [in] RtFlags | dwFlags, | |
| [out] void ** | pBuffer | |||
| ) |
This method returns pointer to the pixel buffer of the bitmap.
| dwFlags | [in] specifies the flags of the lock - can be any combination of RtBitmapBufferFlags members. | |
| pBuffer | [out] is filled with the pointer to the data buffer. |
| E_FAIL | is returned for uninitialized bitmap or when lock is not possible. |
| HRESULT IRdBitmap::CommitPixelBuffer | ( | [in] void * | pBuffer | ) |
This method returns the locked buffer back to bitmap.
| pBuffer | [in] specifies the buffer returned by GetPixelBuffer. |
| E_FAIL | is returned for uninitialized/unlocked bitmap or when unlock is not possible. |
| HRESULT IRdBitmap::LockBitmap | ( | ) |
Lock the bitmap:
| HRESULT IRdBitmap::UnlockBitmap | ( | ) |
Unlock the bitmap after previous call to LockBitmap.
| HRESULT IRdBitmap::CreateDDBitmap | ( | [in] HDC | hDC, | |
| [out, retval] HBITMAP * | pHBitmap | |||
| ) |
This method creates a new device dependent bitmap (DDB) and fills it with color data.
| hDC | [in] specifies the device context. |
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::CreateDDBitmapResized | ( | [in] HDC | hDC, | |
| [in] int | sizeX, | |||
| [in] int | sizeY, | |||
| [out, retval] HBITMAP * | pHBitmap | |||
| ) |
This method creates a new device dependent bitmap (DDB) of given size and fills it with color data.
| hDC | [in] specifies the device context. | |
| sizeX | [in] specifies desired width of the bitmap. | |
| sizeY | [in] specifies desired height of the bitmap. |
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::LoadFromFile | ( | [in] BSTR | FileName | ) |
This method is used to load an image from file.
| FileName | [in] specifies the file name (including optional path) for load. |
E_INVALIDARG for unsupported format.
| HRESULT IRdBitmap::LoadFromResources | ( | [in] HINSTANCE | hInstance, | |
| [in] RtUlong | dwResourceId | |||
| ) |
This method is used to load image from a dll resource.
| hInstance | [in] . | |
| dwResourceId | [in] . |
E_INVALIDARG for unsupported format.
| HRESULT IRdBitmap::GetFileName | ( | [out, retval] BSTR * | pFileName | ) |
Get filename of the bitmap, if it was loaded from file.
Standard HRESULT processing can be applied to the result.
| S_OK | if file was loaded from file | |
| S_FALSE | if file was not loaded from file. |
| HRESULT IRdBitmap::SetIsFromFile | ( | [in] RtBool | bIsFromFile, | |
| [in] BSTR | bstrFileName | |||
| ) |
Set IsFromFile flag and filename of the bitmap:
| bIsFromFile | [in] Specifies if bitmap was loaded from file (TRUE) or not (FALSE). | |
| bstrFileName | [in] Specifies the filename of the bitmap. |
| HRESULT IRdBitmap::SetHBitmap | ( | [in] HBITMAP | hBitmap | ) |
This method is used to load image from a HBITMAP handle.
| hBitmap | [in] specifies the valid bitmap handle used as a source for data. |
| HRESULT IRdBitmap::SaveToFile | ( | [in] RtBitmapFileFormat | Format, | |
| [in] BSTR | FileName | |||
| ) |
This method is used to save image to a file.
| Format | [in] Specifies the format of a bitmap. | |
| FileName | [in] Specifies the target filename of a bitmap. |
| HRESULT IRdBitmap::SaveToFileEx | ( | [in] RtBitmapFileFormat | Format, | |
| [in] BSTR | FileName | |||
| ) |
This method is used to save image to a file using external image library (alpha channel supported).
| Format | [in] Specifies the format of a bitmap. | |
| FileName | [in] Specifies the target filename of a bitmap. |
| HRESULT IRdBitmap::Resize | ( | [in] RtDWORD | dwWidth, | |
| [in] RtDWORD | dwHeight | |||
| ) |
This method is used to resize the bitmap.
| dwWidth | [in] Specifies new width of the bitmap. | |
| dwHeight | [in] Specifies new height of the bitmap. |
| HRESULT IRdBitmap::SetAdvancedFeature | ( | [in] GUID | FeatureID, | |
| [in] DWORD | FeatureModifier, | |||
| [in] VARIANT | FeatureData | |||
| ) |
This method sets properties of extensible advanced features of the bitmap.
| E_NOTIMPL | is returned for unsupported FeatureID. |
| HRESULT IRdBitmap::GetAdvancedFeature | ( | [in] GUID | FeatureID, | |
| [out] DWORD * | FeatureModifier, | |||
| [out] VARIANT * | FeatureData | |||
| ) |
This method gets properties of extensible advanced features of the bitmap.
| E_NOTIMPL | is returned for unsupported FeatureID. |
| HRESULT IRdBitmap::IsAdvancedFeatureSupported | ( | [in] GUID | FeatureID | ) |
This method can be used to determine if advanced feature is supported for bitmap:
| S_OK | is returned for supported feature. | |
| S_FALSE | is returned for unsupported feature. |
| HRESULT IRdBitmap::GetSupportedFormatCount | ( | [out, retval] DWORD * | dwFormatCount | ) |
Return the number of supported loadable formats for enumeration through GetSupportedFormat.
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::GetSupportedFormat | ( | [in] DWORD | dwFormat, | |
| [out] BSTR * | bsMasks, | |||
| [out] BSTR * | bsFormatName | |||
| ) |
Return the information about supported format.
| dwFormat | [in] Specifies the format index. | |
| bsMasks | [out] Is filled with the possible file masks separated by ; (i.e. *.gif or *.jpg;*.jpeg). | |
| bsFormatName | [out] Is filled with the name of the format. |
| E_INVALIDARG | is returned for invalid index. |
| HRESULT IRdBitmap::IsEqual | ( | [in] IRdBitmap * | pBitmap, | |
| [out, retval] BOOL * | bEqualityResult | |||
| ) |
Checks bitmap for equality with other bitmap.
| pBitmap | [in] Specifies the other bitmap in the test. |
Standard HRESULT processing can be applied to the result.
| S_OK | for equal bitmaps. | |
| S_FALSE | for non equal bitmaps. | |
| E_XXX | error code should be also considered as non-equality result. |
| HRESULT IRdBitmap::ImageSizeFromFile | ( | [in] BSTR | FileName, | |
| [out] DWORD * | width, | |||
| [out] DWORD * | height | |||
| ) |
Return Width and Height of the file on disk (if supported).
| FileName | [in] Specifies the name (and path) of a file to return size. | |
| width | [out] Is filled with the width of the bitmap in file. | |
| height | [out] Is filled with the height of the bitmap in file. |
| S_OK | if image file was found and size was returned. |
| HRESULT IRdBitmap::GetDownsampledFlag | ( | [out, retval] RtBool * | pVal | ) |
Get down-sampled flag.
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::SetDownsampledFlag | ( | [in] RtBool | newVal | ) |
Set down-sampled flag.
| newVal | [in] Specifies the value of down-sampling. |
| HRESULT IRdBitmap::SaveAsFileToStream | ( | [in] IStream * | pStream, | |
| [in] RtBitmapFileFormat | format, | |||
| [in] RtBool | bSaveSizeToStream, | |||
| [out, retval] RtDWORD * | pdwSize | |||
| ) |
Save the bitmap as file into stream.
| pStream | [in] Destination Stream to which the bitmap will be saved. | |
| format | [in] File format in which the bitmap will be saved. | |
| bSaveSizeToStream | [in] If , then the saved bitmap size will be written as first (type of DWORD) and only then the bitmap itself will be saved. |
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::LoadAsFileFromStream | ( | [in] IStream * | pStream, | |
| [in] RtDWORD | dwSize | |||
| ) |
Load the bitmap as file from stream.
| pStream | [in] Source stream. | |
| dwSize | [in] Size of the bitmap in the stream.
|
| HRESULT IRdBitmap::CreateDIBitmap32 | ( | [in] HDC | hDC, | |
| [out, retval] HBITMAP * | pHBitmap | |||
| ) |
This method creates device independent bitmap 32bit (DIB) and fills it with color data.
| hDC | [in] specifies the device context. |
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::GrayscaleBitmap | ( | [in] int | iGrayPercent, | |
| [in] RtBool | bPixelTransparent | |||
| ) |
This method change bitmap data to gray scale bitmap if iGrayPercent is 100 or change saturation of bitmap.
| iGrayPercent | [in] Degree of desaturation. | |
| bPixelTransparent | [in] If true leave the first pixel of bitmap (and others of the same color) unchanged. |
| HRESULT IRdBitmap::DrawBitmap | ( | [in] HDC | hDC, | |
| [in] int | left, | |||
| [in] int | top, | |||
| [in] RtBool | bPixelTransparent | |||
| ) |
This method sends the bitmap data to the hDC (device context).
| hDC | [in] Specifies the device context. | |
| left | [in] Specifies the horizontal location, in device units, at which to draw the image. | |
| top | [in] Specifies the vertical location, in device units, at which to draw the image. | |
| bPixelTransparent | [in] If true leave the first pixel of bitmap (and others of the same color) unchanged. |
| HRESULT IRdBitmap::GetAlphaBlendBitmap | ( | [in] HDC | hDC, | |
| [in] int | left, | |||
| [in] int | top, | |||
| [in] RtBool | bPixelTransparent, | |||
| [out, retval] HBITMAP * | pHBitmap | |||
| ) |
This method return alpha blend bitmap.
| hDC | [in] Specifies the device context. | |
| left | [in] Specifies the horizontal location, in device units, at which to draw the image. | |
| top | [in] Specifies the vertical location, in device units, at which to draw the image. | |
| bPixelTransparent | [in] If true leave the first pixel of bitmap (and others of the same color) unchanged. |
Standard HRESULT processing can be applied to the result.
| HRESULT IRdBitmap::GetBitmapSize | ( | [out] SIZE * | pSize | ) |
This method returns dimension of the bitmap.
| pSize | [out] Is filled with the size of the bitmap. |
| HRESULT IRdBitmap::DrawBitmap32 | ( | [in] HDC | hDC, | |
| [in] int | left, | |||
| [in] int | top, | |||
| [in] RtBYTE | bConsAlphaBlend, | |||
| [in] RtBool | bKeepVisible | |||
| ) |
This method sends the bitmap data to the hDC (device context).
| hDC | [in] Specifies the device context. | |
| left | [in] Specifies the horizontal location, in device units, at which to draw the image. | |
| top | [in] Specifies the vertical location, in device units, at which to draw the image. | |
| bConstantAlpha | [in] Specifies the value of additional constant alpha value during drawing the image, if value is 255, origin bitmap alpha channel is used, otherwise is rescale by this value. |
1.5.5