Results 1 to 5 of 5

Thread: .TGA to .BMP

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    Cheshire, England
    Posts
    116

    .TGA to .BMP

    i know it aint exactly programming related, but i'm just doing a bit of mapping and i need to convert ... 1891 .tga textures into 256 colour .bmps can someone point me in the direction of somethin that will convert em for me

    i found a proggie called tga2bmp (conveniently) but it converts em 1 by 1, which would take me close to retirement before i finished, so any help will be appreciated.

    thx
    --- Counter-Terrorists Win ---

    http://manix.pax3k.co.uk
    www.manix-creations.net

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Talking

    Did you ever use DOS? Then you know about batch files maybe.. simply make a script that loops through all files in a dir, and tga2bmp's them. I forget most of batch files, but you could do a google to find more info.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    Cheshire, England
    Posts
    116
    i used DOSand batch files , ... but only to the extent of typing \Duke3D.bat , but i looked on the net and found a batch file that converts it and got it done, however ... i wanted to put em into a wad3 file and they have to be 8 bit .bmps and ... these files aint, any idea how to lower the quality of em to 8 bit? in bulk and quickly
    --- Counter-Terrorists Win ---

    http://manix.pax3k.co.uk
    www.manix-creations.net

  4. #4
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    Whats the quality of ur bitmaps? 32bit?

    you do know that 8 bit bitmaps use a pallete as opposed to 16+ bits which use RGB on every pixel. The only difference on 16, 24, and 32 bit- bitmaps is the boundry allignment (dont worry, you dont need to know about all this technicallity if you're just worried about converting them in batch).

    Im thinking to just make a small program in vb that will take command line arguments and load a tga picture into the picturebox, then use getdibsection to get the bitmap handle, create a pallete (most likely the web216 pallete but u can do any pallete u like), and then output the bitmap by filling the bmpinfo structures and then doing a binarywrite.

    But there might be a problem with this method. Does loadpicture call load tga pictures into a picturebox?

    if it doesnt, you have to find an api.... or something..


    But this should not be too hard.
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

  5. #5
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    Its me again,

    Whew!! I Didnt know tga's where quite a pain in the arse!! I made the program i described to you earlier and it didnt work, then i find out that loadpicture or loadimage doesnt load tga's, and i also find out tga is not a native format or popular either... hmm...

    So i searched the web on how to play around with tga's and found a C++ program that reads/writes Targa files. So I started working on a VB Class that can do the exact same as that C++ Program. I am wrapping all the ugly code in a nice and easy to use class.

    I will post the class here as soon as im done, and the whole program too.

    Layta,
    MoMad
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width