* TexTarga C++ Library [#r668a121] ** Abstract [#v04cd5c1] TexTarga C++ Libraryは TexTarga画像データを簡単に扱うためのC++ライブラリです。 ** Download [#z4fe86e8] [[http://www.10106.net/~hoboaki/download/textga/textga_cpplib/]] ** Sample Code [#t14a4c68] #code(c,){{ #include <textga/textga.h> void main() { // Load TGAFile ::textga::TGAFileLoader loader( "tgaFilePath.tga" ); if ( !loader.isLoaded() ) { // Load Failed return; } // Standard TGA Check const ::textga::TGADataAccessor tgaDataAccessor = loader.tgaDataAccessor(); if ( !tgaDataAccessor.isSupportedTGA() ) { // Not supported tga file return; } // Standard TGA Data Access // tgaDataAccessor.width(); // get width // tgaDataAccessor.height(); // get height // tgaDataAccessor.pixelAtIndex(0); // get first pixel data // and more. see TGADataAccessor.hpp // TexTarga Check if ( !tgaDataAccessor.isTexTarga() ) { // Not tex targa return; } // TexTarga Data Access // tgaDataAccessor.pixelFormat() // get PixelFormat(see PixelFormat.hpp) // tgaDataAccessor.srcDataPixelAtIndex(0) // get before convert pixel data // and more. see TGADataAccessor.hpp } }} |