TexTarga C++ Library Edit

Features Edit

TexTarga C++ Libraryは
TexTarga画像データを扱うためのC++ライブラリです。
主な機能

  • 24bit or 32bit Targaのみサポート。
  • イメージの横幅、縦幅の取得。
  • ピクセルデータの取得。
  • TexTargaデータ情報のアクセス。
    • ピクセルフォーマットの取得。
    • コンバート前のピクセルデータの取得。

Download Edit

http://www.10106.net/~hoboaki/download/textga/textga_cpplib/

Example Code Edit

すべてを展開すべてを収束
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 
 
 
-
|
|
|
-
|
|
!
|
|
|
|
-
|
|
!
|
|
|
|
|
|
|
|
|
-
|
|
!
|
|
|
|
|
|
!
 
#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 Edit


URL B I U SIZE Black Maroon Green Olive Navy Purple Teal Gray Silver Red Lime Yellow Blue Fuchsia Aqua White

    ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS