#include <exjpeg.h>
Inheritance diagram for JPEGExportOptions:
Public Member Functions | |
JPEGExportOptions () | |
Default constructor for a JPEGExportOptions object. | |
JPEGExportOptions (const FilterType FilterID, const StringBase *pFilterName) | |
Constructor for a JPEGExportOptions object. | |
virtual BOOL | RetrieveDefaults () |
Compares the contents of this and pOther objects Provides additional implementation required for retrieving JPEG specific defaults. See Also: BitmapExportOptions::RetrieveDefaults(). | |
virtual BOOL | SetAsDefaults () const |
Provides additional implementation to set JPEG specific info as defaults See Also: BitmapExportOptions::SetAsDefaults(). | |
virtual BOOL | Write (CXaraFileRecord *pRec) |
Writes this object to the given record. | |
virtual BOOL | Read (CXaraFileRecord *pRec) |
Reads this object from the given record. | |
virtual BOOL | GetSupportsImageMap () |
BOOL | DoAsProgressive () const |
Provides a JPEG specific export parameter. | |
BOOL | SetMakeProgressive (BOOL bProgressive) |
Sets a JPEG specific export parameter. | |
JPEG_QUALITY | GetQuality () const |
Provides a JPEG specific export parameter. | |
BOOL | SetQuality (const JPEG_QUALITY &Quality) |
Sets a JPEG specific export parameter. | |
libJPEG::J_DCT_METHOD | GetDCTMethod () const |
Provides a JPEG specific export parameter. | |
BOOL | SetDCTMethod (const libJPEG::J_DCT_METHOD &DCTMethod) |
Sets an IJG specific parameter Notes: NOT a user (interface) option. | |
libJPEG::J_COLOR_SPACE | GetColourModel () const |
Provides a IJG specific export parameter See Also: GetColourComponentCount(). | |
UINT32 | GetColourComponentCount () const |
Provides an IJG specific export parameter See Also: GetColourComponentCount(). | |
BOOL | SetColourModel (const libJPEG::J_COLOR_SPACE &ColourModel) |
Sets an IJG specific parameter Notes: The bitmap is expected to be of the correct format or a converter (DIBConvert) provided when the bitmap is written. | |
virtual BOOL | CopyFrom (BitmapExportOptions *pOther) |
Sets the contents of this object from the passed object See Also: BitmapExportOptions::MakeCopy(). | |
virtual BOOL | FileTypeChangeCopyFrom (BitmapExportOptions *pOther) |
Copies the information from the BitmapExportOptions object passed in as the argument to the palette object in this class. | |
virtual UINT32 | GetFilterNameStrID () |
Static Public Member Functions | |
static void | SetKernelBitmap (KernelBitmap *pBitmap) |
static KernelBitmap * | GetKernelBitmap () |
static void | SetJPEGPresentAndSelected (BOOL Value) |
static BOOL | GetJPEGPresentAndSelected () |
Public Attributes | |
BOOL | m_bJPEGPresentAndSelected |
Protected Attributes | |
JPEG_QUALITY | m_Quality |
BOOL | m_DoAsProgressive |
libJPEG::J_DCT_METHOD | m_DCTMethod |
libJPEG::J_COLOR_SPACE | m_ColourModel |
UINT32 | m_ColourComponents |
Static Protected Attributes | |
static KernelBitmap * | pKernelBitmap = NULL |
static BOOL | m_JPEGPresentAndSelected = FALSE |
Private Member Functions | |
CC_DECLARE_DYNCREATE (JPEGExportOptions) |
Definition at line 120 of file exjpeg.h.
|
Default constructor for a JPEGExportOptions object.
Definition at line 170 of file exjpeg.cpp. 00171 : m_bJPEGPresentAndSelected(0), 00172 m_Quality(100), 00173 m_DoAsProgressive(FALSE), 00174 m_DCTMethod(libJPEG::JDCT_DEFAULT), 00175 m_ColourModel(libJPEG::JCS_UNKNOWN), 00176 m_ColourComponents(0) 00177 { 00178 // Empty. 00179 }
|
|
Constructor for a JPEGExportOptions object.
Definition at line 191 of file exjpeg.cpp. 00192 : BitmapExportOptions(_R(IDD_EXPORTJPEGOPTS), FilterID, pFilterName), 00193 m_bJPEGPresentAndSelected(0), 00194 m_Quality(100), 00195 m_DoAsProgressive(FALSE), 00196 m_DCTMethod(libJPEG::JDCT_DEFAULT), 00197 m_ColourModel(libJPEG::JCS_UNKNOWN), 00198 m_ColourComponents(0) 00199 { 00200 // Empty. 00201 }
|
|
|
|
Sets the contents of this object from the passed object See Also: BitmapExportOptions::MakeCopy().
Reimplemented from BitmapExportOptions. Definition at line 215 of file exjpeg.cpp. 00216 { 00217 // copy the base class first 00218 if (!BitmapExportOptions::CopyFrom(pSource)) 00219 return FALSE; 00220 00221 // must be the same class, otherwise the base class function above returns FALSE 00222 JPEGExportOptions *pOther = (JPEGExportOptions *)pSource; 00223 00224 m_Quality = pOther->m_Quality; 00225 m_DoAsProgressive = pOther->m_DoAsProgressive; 00226 m_DCTMethod = pOther->m_DCTMethod; 00227 m_ColourModel = pOther->m_ColourModel; 00228 m_ColourComponents = pOther->m_ColourComponents; 00229 m_bJPEGPresentAndSelected = pOther->m_bJPEGPresentAndSelected; 00230 00231 return TRUE; 00232 };
|
|
Provides a JPEG specific export parameter.
Definition at line 403 of file exjpeg.cpp. 00404 { 00405 return m_DoAsProgressive; 00406 }
|
|
Copies the information from the BitmapExportOptions object passed in as the argument to the palette object in this class.
Reimplemented from BitmapExportOptions. Definition at line 235 of file exjpeg.cpp. 00236 { 00237 // copy the base class first 00238 if (!BitmapExportOptions::FileTypeChangeCopyFrom(pOther)) 00239 return FALSE; 00240 00241 // No other options types has the JPEG options, so have to use the default values 00242 m_Quality = 75; 00243 m_DoAsProgressive = FALSE; 00244 m_DCTMethod = libJPEG::JDCT_DEFAULT; 00245 m_ColourModel = libJPEG::JCS_UNKNOWN; 00246 m_ColourComponents = 0; 00247 m_bJPEGPresentAndSelected = 0; 00248 00249 // Ensure that the JPEG depth is less than 32 bpp. 00250 if( GetDepth() == 32 ) 00251 { 00252 SetDepth( 24 ); 00253 } 00254 00255 return TRUE; 00256 }
|
|
Provides an IJG specific export parameter See Also: GetColourComponentCount().
Definition at line 586 of file exjpeg.cpp. 00587 { 00588 return m_ColourComponents; 00589 }
|
|
Provides a IJG specific export parameter See Also: GetColourComponentCount().
Definition at line 568 of file exjpeg.cpp. 00569 { 00570 return m_ColourModel; 00571 }
|
|
Provides a JPEG specific export parameter.
Definition at line 437 of file exjpeg.cpp. 00438 { 00439 return m_DCTMethod; 00440 }
|
|
Reimplemented from BitmapExportOptions. Definition at line 167 of file exjpeg.h. 00167 { return _R(IDS_JPG_EXP_FILTERNAME);}
|
|
Definition at line 155 of file exjpeg.h. 00155 { return m_JPEGPresentAndSelected; }
|
|
Definition at line 152 of file exjpeg.h. 00152 { return pKernelBitmap; }
|
|
Provides a JPEG specific export parameter.
Definition at line 420 of file exjpeg.cpp. 00421 { 00422 return m_Quality; 00423 }
|
|
Reimplemented from BitmapExportOptions. Definition at line 135 of file exjpeg.h. 00135 { return TRUE; }
|
|
Reads this object from the given record.
Reimplemented from BitmapExportOptions. Definition at line 379 of file exjpeg.cpp. 00380 { 00381 m_DoAsProgressive = FALSE; 00382 return BitmapExportOptions::Read(pRec) && 00383 pRec->ReadUINT32((UINT32*) &m_Quality) && 00384 pRec->ReadBYTEtoBOOL(&m_DoAsProgressive) && 00385 pRec->ReadINT16((INT16*) &m_DCTMethod) && 00386 pRec->ReadINT16((INT16*) &m_ColourModel) && 00387 pRec->ReadUINT32((UINT32*) &m_ColourComponents); 00388 }
|
|
Compares the contents of this and pOther objects Provides additional implementation required for retrieving JPEG specific defaults. See Also: BitmapExportOptions::RetrieveDefaults().
Reimplemented from BitmapExportOptions. Definition at line 303 of file exjpeg.cpp. 00304 { 00305 if (!BitmapExportOptions::RetrieveDefaults()) 00306 { 00307 return FALSE; 00308 } 00309 m_Quality = g_DefaultCompression; 00310 m_DoAsProgressive = g_bExportProgressive; 00311 m_DCTMethod = g_DefaultDCTMethod; 00312 SetDepth(24); // all jpegs are 24 after all -sjk 00313 00314 return TRUE; 00315 }
|
|
Provides additional implementation to set JPEG specific info as defaults See Also: BitmapExportOptions::SetAsDefaults().
Reimplemented from BitmapExportOptions. Definition at line 328 of file exjpeg.cpp. 00329 { 00330 if (!BitmapExportOptions::SetAsDefaults()) 00331 { 00332 return FALSE; 00333 } 00334 00335 // TODO: Fill in JPEG specific statics need sorting 00336 g_DefaultCompression = m_Quality; 00337 g_bExportProgressive = m_DoAsProgressive; 00338 g_DefaultDCTMethod = m_DCTMethod; 00339 00340 return TRUE; 00341 }
|
|
Sets an IJG specific parameter Notes: The bitmap is expected to be of the correct format or a converter (DIBConvert) provided when the bitmap is written.
Definition at line 533 of file exjpeg.cpp. 00534 { 00535 switch (ColourModel) 00536 { 00537 case libJPEG::JCS_RGB: 00538 // This really should be RGB_PIXELSIZE (in jmorecfg.h), but this isn't exported! 00539 m_ColourComponents = 3; 00540 break; 00541 00542 case libJPEG::JCS_GRAYSCALE: 00543 m_ColourComponents = 1; 00544 break; 00545 00546 default: 00547 ERROR2(FALSE, "Invalid Colour Model method"); 00548 00549 } 00550 00551 m_ColourModel = ColourModel; 00552 00553 return TRUE; // success 00554 }
|
|
Sets an IJG specific parameter Notes: NOT a user (interface) option.
Definition at line 506 of file exjpeg.cpp. 00507 { 00508 ERROR2IF(DCTMethod != libJPEG::JDCT_ISLOW && DCTMethod != libJPEG::JDCT_IFAST && DCTMethod != libJPEG::JDCT_FLOAT, 00509 FALSE, "Invalid DCT method"); 00510 00511 m_DCTMethod = DCTMethod; 00512 00513 return TRUE; 00514 }
|
|
Definition at line 154 of file exjpeg.h. 00154 { m_JPEGPresentAndSelected = Value; }
|
|
Definition at line 151 of file exjpeg.h. 00151 { pKernelBitmap = pBitmap; }
|
|
Sets a JPEG specific export parameter.
Definition at line 481 of file exjpeg.cpp. 00482 { 00483 if (m_DoAsProgressive != bProgressive) 00484 SetTempFileMatchesExportOptions(FALSE); 00485 m_DoAsProgressive = bProgressive; 00486 00487 return TRUE; 00488 }
|
|
Sets a JPEG specific export parameter.
Definition at line 456 of file exjpeg.cpp. 00457 { 00458 ERROR2IF(Quality < 0 || Quality > 100, FALSE, "Quality out of range"); 00459 00460 if (m_Quality != Quality) 00461 SetTempFileMatchesExportOptions(FALSE); 00462 m_Quality = Quality; 00463 00464 return TRUE; 00465 }
|
|
Writes this object to the given record.
Reimplemented from BitmapExportOptions. Definition at line 356 of file exjpeg.cpp. 00357 { 00358 return BitmapExportOptions::Write(pRec) && 00359 pRec->WriteUINT32(m_Quality) && 00360 pRec->WriteBYTE((BYTE) !!m_DoAsProgressive) && 00361 pRec->WriteINT16((INT16) m_DCTMethod) && 00362 pRec->WriteINT16((INT16) m_ColourModel) && 00363 pRec->WriteUINT32(m_ColourComponents); 00364 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|