![]() |
VR-Forces Developer's Guide
|
Class responsible for converting images into MAK encrypted image files.
Classes | |
| struct | CompositeImage |
Public Types | |
| enum | EffectTextureType { None, NormalMap, Emissive } |
| typedef std::vector < CompositeImage > | ImageList |
Public Member Functions | |
| DtMeifConverter () | |
| virtual | ~DtMeifConverter () |
| bool | createEncryptedImage (const std::string &filename, const std::string &outputFile, const osgDB::ReaderWriter::Options *options, bool flipOutputImage, EffectTextureType textureType, bool verbose, bool generate_dds) |
| bool | createCompressedImage (osg::ref_ptr< osg::Image > &img, const std::string &inputFilename, const std::string &outputFile, bool flipOutputImage, EffectTextureType textureType, bool generateMipMaps, int qualityLevel, bool verbose, bool generate_dds) |
| bool | startTBBCompressionTaskIfPossible (osg::Image *image) |
| void | resizeImageIfNeeded (osg::ref_ptr< osg::Image > &img) |
| void | write_and_compress_dds_data (FILE *file, const struct DDS_HEADER &ddsHeader, unsigned int blockDataSize, unsigned char *blockData) |
| bool | compositeImages (const ImageList &files, const std::string &outputFile, int outputWidth, int outputHeight, int cols, int rows, bool forceNoAlpha, bool composeRowsTopToBottom, bool verbose) |
| EffectTextureType | effectTextureType (const std::string &filename) const |
| virtual void | setupCompressionFormat (osg::ref_ptr< osg::Image > &img, DtMeifConverter::EffectTextureType textureType, osg::ref_ptr< osg::Texture > &texture) |
| void | resizeImagePow2 (osg::Image *img, int newW, int newH) |
| bool | createBinaryData (unsigned int compressedFormat, osg::ref_ptr< osg::Image > &img, bool mipMaps, int qualityLevel, bool verbose, unsigned int &blockDataSize, unsigned char *&blockData, bool &deleteBlockData, osg::Image::MipmapDataType &mipOffsets) |
Static Public Member Functions | |
| static bool | convertToRGBA (osg::ref_ptr< osg::Image > &img, unsigned char *&rgbaPixels, bool &deletePixels, bool verbose) |
| static bool | isPowerOf2 (unsigned int i) |
| static unsigned int | nextPowerOf2 (unsigned int i) |
| static unsigned int | logBase2 (unsigned int i) |
Private Member Functions | |
| DtMeifConverter (const DtMeifConverter &other) | |
| DtMeifConverter & | operator= (const DtMeifConverter &other) |
| typedef std::vector<CompositeImage> makVrv::DtMeifConverter::ImageList |
| makVrv::DtMeifConverter::DtMeifConverter | ( | ) |
CTOR.
|
virtual |
DTOR.
|
private |
Copy Constructor not implemented – Copy Not Allowed.
|
private |
Assignment Operator Not implemented – Assignment Not Allowed.
| bool makVrv::DtMeifConverter::createEncryptedImage | ( | const std::string & | filename, |
| const std::string & | outputFile, | ||
| const osgDB::ReaderWriter::Options * | options, | ||
| bool | flipOutputImage, | ||
| EffectTextureType | textureType, | ||
| bool | verbose, | ||
| bool | generate_dds | ||
| ) |
Encrypt a image from a file. options = null means use default behavior (ex. for medftool)
| bool makVrv::DtMeifConverter::createCompressedImage | ( | osg::ref_ptr< osg::Image > & | img, |
| const std::string & | inputFilename, | ||
| const std::string & | outputFile, | ||
| bool | flipOutputImage, | ||
| EffectTextureType | textureType, | ||
| bool | generateMipMaps, | ||
| int | qualityLevel, | ||
| bool | verbose, | ||
| bool | generate_dds | ||
| ) |
Create a compressed image.
| bool makVrv::DtMeifConverter::startTBBCompressionTaskIfPossible | ( | osg::Image * | image | ) |
checks to see if there is a thread available for starting a compression task and starts the task if there is
| void makVrv::DtMeifConverter::resizeImageIfNeeded | ( | osg::ref_ptr< osg::Image > & | img | ) |
| void makVrv::DtMeifConverter::write_and_compress_dds_data | ( | FILE * | file, |
| const struct DDS_HEADER & | ddsHeader, | ||
| unsigned int | blockDataSize, | ||
| unsigned char * | blockData | ||
| ) |
| bool makVrv::DtMeifConverter::compositeImages | ( | const ImageList & | files, |
| const std::string & | outputFile, | ||
| int | outputWidth, | ||
| int | outputHeight, | ||
| int | cols, | ||
| int | rows, | ||
| bool | forceNoAlpha, | ||
| bool | composeRowsTopToBottom, | ||
| bool | verbose | ||
| ) |
Composite images together, the list of files is in row major order.
|
static |
Convert an image to a buffer of RGBA pixels.
| EffectTextureType makVrv::DtMeifConverter::effectTextureType | ( | const std::string & | filename | ) | const |
Return type of effect texture from filename.
|
virtual |
Resizes the image to the next power of 2.
| bool makVrv::DtMeifConverter::createBinaryData | ( | unsigned int | compressedFormat, |
| osg::ref_ptr< osg::Image > & | img, | ||
| bool | mipMaps, | ||
| int | qualityLevel, | ||
| bool | verbose, | ||
| unsigned int & | blockDataSize, | ||
| unsigned char *& | blockData, | ||
| bool & | deleteBlockData, | ||
| osg::Image::MipmapDataType & | mipOffsets | ||
| ) |
Create the raw binary data to write out.