* TexTarga C++ Library [#r668a121] ** Features [#v04cd5c1] TexTarga C++ Libraryは TexTarga画像データを扱うためのC++ライブラリです。 主な機能 - 24bit or 32bit Targaのみサポート。 - イメージの横幅、縦幅の取得。 - ピクセルデータの取得。 - TexTargaデータ情報のアクセス。 -- ピクセルフォーマットの取得。 -- コンバート前のピクセルデータの取得。 ** Download [#z4fe86e8] [[http://www.10106.net/~hoboaki/download/textga/textga_cpplib/]] ** Example 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 } }} ** History [#cc5023fe] #comment(below) - Ver1.0リリース。 -- [[あっきー]] &new{2007-12-31 (月) 03:55:05}; |