Thread: Loading TGAs into CImage

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    423

    Loading TGAs into CImage

    Hi
    i wanted a program to quickly convert bunch of image files into another format(ex. bmp to jpg). So i added that functionality to the msdn sample "SimpleImage" (modified) - goto Tools>Convert Multiple Files.

    But now i have this set of TGA files that i want to convert to JPGs, but the GetExporterFilterString() function does not return TGA as an available image format (program uses CImage library). so CImage::Load() fails when trying to load TGAs. Does anyone know a way to load TGAs into an CImage object?

    Thanx.
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amateur English)

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,794
    I would inherit my clas from the CImage and implement its fuctions for the TGA format using something like
    http://local.wasp.uwa.edu.au/~pbourke/dataformats/tga/
    for the source information...
    For all other formats I would call the base-class functions
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cargo loading system
    By kyle rull in forum C Programming
    Replies: 1
    Last Post: 04-20-2009, 12:16 PM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Loading a bitmap (Without using glaux)
    By Shamino in forum Game Programming
    Replies: 7
    Last Post: 03-16-2006, 09:43 AM
  4. Loading Screen
    By pinkcheese in forum Windows Programming
    Replies: 2
    Last Post: 04-06-2002, 11:48 PM