#include <CImage.h>
Definition at line 58 of file CImage.h.
◆ CImage()
Definition at line 28 of file CImage.cpp.
31 #ifdef __PNMEXSUPPORT__
void SetMaxValue(int maxValue)
◆ ~CImage()
◆ Create() [1/2]
bool CImage::Create |
( |
int |
width, |
|
|
int |
height, |
|
|
int |
bpp |
|
) |
| |
Definition at line 43 of file CImage.cpp.
44 return TRUE ==
m_image->setSize(FIT_BITMAP, (WORD)width, (WORD)height, (WORD)bpp);
◆ Create() [2/2]
bool CImage::Create |
( |
int |
width, |
|
|
int |
height, |
|
|
unsigned char |
type |
|
) |
| |
Definition at line 49 of file CImage.cpp.
50 FREE_IMAGE_TYPE FItype;
73 return TRUE ==
m_image->setSize(FItype, (WORD)width, (WORD)height, (WORD)bpp, FI16_565_RED_MASK, FI16_565_GREEN_MASK, FI16_565_BLUE_MASK);
93 return TRUE ==
m_image->setSize(FItype, (WORD)width, (WORD)height, (WORD)bpp);
#define ImageModeRGBColor
#define ImageModeGrayScale
#define ImageModeIndexedColor
◆ GetBits()
unsigned char * CImage::GetBits |
( |
| ) |
const |
◆ GetBPP()
unsigned char CImage::GetBPP |
( |
| ) |
const |
◆ GetChannelDepth()
int CImage::GetChannelDepth |
( |
| ) |
const |
Definition at line 250 of file CImage.cpp.
#define ImageModeRGBColor
#define ImageModeGrayScale
#define ImageModeIndexedColor
unsigned char GetColorType() const
◆ GetChannels()
int CImage::GetChannels |
( |
| ) |
const |
Definition at line 276 of file CImage.cpp.
#define ImageModeRGBColor
#define ImageModeGrayScale
#define ImageModeIndexedColor
unsigned char GetColorType() const
◆ GetColorTable()
void CImage::GetColorTable |
( |
int |
firstColor, |
|
|
int |
numColors, |
|
|
void * |
prgbColors |
|
) |
| |
Definition at line 156 of file CImage.cpp.
157 RGBQUAD* palette =
m_image->getPalette();
158 int max = firstColor + numColors;
160 RGBQUAD* target = (RGBQUAD*)prgbColors;
161 for (
int i = firstColor; i < max; ++i) {
162 target[i] = palette[i];
◆ GetColorType()
unsigned char CImage::GetColorType |
( |
| ) |
const |
Definition at line 178 of file CImage.cpp.
179 switch (
m_image->getImageType()) {
182 switch (
m_image->getColorType()) {
185 switch (
m_image->getBitsPerPixel()) {
203 switch (
m_image->getBitsPerPixel()) {
221 switch (
m_image->getBitsPerPixel()) {
236 if (
m_image->getColorType() == FIC_RGB)
#define ImageModeRGBColor
#define ImageModeGrayScale
#define ImageModeIndexedColor
◆ GetHeight()
unsigned int CImage::GetHeight |
( |
| ) |
const |
◆ GetMaxColorTableEntries()
int CImage::GetMaxColorTableEntries |
( |
| ) |
|
◆ GetMaxValue()
int CImage::GetMaxValue |
( |
| ) |
const |
Definition at line 323 of file CImage.cpp.
int GetChannelDepth() const
◆ GetPitch()
int CImage::GetPitch |
( |
| ) |
const |
◆ GetWidth()
unsigned int CImage::GetWidth |
( |
| ) |
const |
◆ IsIndexed()
bool CImage::IsIndexed |
( |
| ) |
|
Definition at line 144 of file CImage.cpp.
145 return ((
m_image->getColorType() == FIC_PALETTE) ||
146 (
m_image->getColorType() == FIC_MINISBLACK) ||
147 (
m_image->getColorType() == FIC_MINISWHITE));
◆ IsTransparencySupported()
bool CImage::IsTransparencySupported |
( |
| ) |
|
◆ Load()
bool CImage::Load |
( |
const char * |
source | ) |
|
Definition at line 127 of file CImage.cpp.
128 if (
m_image->load(source, 0)) {
unsigned char GetColorType() const
◆ RegisterPNM()
void CImage::RegisterPNM |
( |
| ) |
|
|
static |
Definition at line 303 of file CImage.cpp.
304 FREE_IMAGE_FORMAT fif = FreeImage_RegisterLocalPlugin(
InitPNM);
306 FreeImage_SetPluginEnabled(FIF_PBMRAW, FALSE);
307 FreeImage_SetPluginEnabled(FIF_PBM, FALSE);
308 FreeImage_SetPluginEnabled(FIF_PGMRAW, FALSE);
309 FreeImage_SetPluginEnabled(FIF_PGM, FALSE);
310 FreeImage_SetPluginEnabled(FIF_PPMRAW, FALSE);
311 FreeImage_SetPluginEnabled(FIF_PPM, FALSE);
313 FreeImage_SetPluginEnabled(fif, TRUE);
void DLL_CALLCONV InitPNM(Plugin *plugin, int format_id)
◆ Save()
bool CImage::Save |
( |
const char * |
dest | ) |
|
◆ SetColorTable()
void CImage::SetColorTable |
( |
int |
firstColor, |
|
|
int |
numColors, |
|
|
const void * |
prgbColors |
|
) |
| |
Definition at line 167 of file CImage.cpp.
168 RGBQUAD* palette =
m_image->getPalette();
169 int max = firstColor + numColors;
171 RGBQUAD* source = (RGBQUAD*)prgbColors;
172 for (
int i = firstColor; i < max; ++i) {
173 palette[i] = source[i];
◆ SetMaxValue()
void CImage::SetMaxValue |
( |
int |
maxValue | ) |
|
◆ m_image
fipImage* CImage::m_image |
|
private |
The documentation for this class was generated from the following files: