|
-
Aug 11th, 2002, 08:00 AM
#1
Thread Starter
Lively Member
.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
-
Aug 11th, 2002, 09:40 AM
#2
Good Ol' Platypus
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)
-
Aug 11th, 2002, 11:40 AM
#3
Thread Starter
Lively Member
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
-
Aug 14th, 2002, 07:01 PM
#4
Fanatic Member
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.
-
Aug 15th, 2002, 05:04 PM
#5
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|