HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

StressTest for my .tga <-> .blp util (finished: closed)

07-01-2002, 01:29 AM#1
DJBnJack
Edited because: This is old, check the new thread HERE.

Okay... As I don't have the Retail yet,
I need some help.

Here goes:
This lil util should be able to convert RETAIL .blp files to .tga and back. But I haven't tested it with warcraft yet.
I hope someone can make this work!

If you get some .dll errors or runtime-errors on start of the proggie, check the web for the vb .dll files (this is again a vb-tool, I'm gonna make some c++ soon ;) )

Good Luck and be creative!

Thnx in advance,
DJBnJack
07-02-2002, 02:12 AM#2
Guest
very nice, works fine here, but could you add a browse button and make it smaller pls? =)

its a pain typing out pathnames
07-02-2002, 02:42 AM#3
DJBnJack
Thanx for testing and:

Offcourse I'm gonna ad that in!!!
This is just a stress-test, I'm gonna do a new GUI for this tool soon :-)

Greetz,
DJBnJack
07-02-2002, 08:30 AM#4
BlacKDicK
I got an error.

I converted "Textures\WaterBlobs1.blp" to TGA and then back to BLP1. The new BLP1 header is 788 bytes long, it should be 1180

At the end of the jpg header, "F9FA" it should come "FFC0" and then 396 zeroes and then the jpg data "0014 0800 4000"

Instead, i got "F9FA FFD9 FFD8 FFC0 0014 0800 4000"

Got "extra" FFD9 FFD8 and missed 396 zeroes.
788-4+396 should then be equal to the 1080 header.

So, erase the FFD9 FFD8 and add 396 zeroes.
07-02-2002, 11:11 AM#5
DJBnJack
:)

Yeah... those zeros I did forget, thanx for pointing it out!

But that those weird end-bytes are (I think Edited because: I shouldn't think anymore .) because of the IJL I'm currently using... I'm wondering how WC3 will take that...

I'll work on it some more =)

Greetz,
DJBnJack

Edited because: Okay... updated it (see first post) It might work now (using the beta ijl and maybe retail ijl).
07-03-2002, 04:53 PM#6
Berry2K
Is it just me or can't Photoshop 7 read alpha channel info from .tga files and can't save it to them either? The help file states:
"Note: As long as you save a file in a format supporting the image's color mode, the color channels are preserved. Alpha channels are preserved only when you save a file in Adobe Photoshop, PDF, PICT, Pixar, TIFF, or Raw formats. DCS 2.0 format only preserves spot channels. Saving in other formats may cause channel information to be discarded."
And it doesn't, either.
07-04-2002, 09:49 AM#7
zepir
Well, it maybe because you use a RGB format. If you use a CMYK format you should have the war3 alpha channel saved (it's part of the format and it's not an "extra" channel).
I can also tell that Corel Photopaint does save 1 alpha channel on RGB TGA if there is a selection (the selection mask is used as an alpha channel).

-=Zépir oo
07-04-2002, 01:00 PM#8
Berry2K
After some further expirimentation I have to conclude the program doesn't work properly. Take a .blp; convert it to tga; convert it back to blp. Now try converting it to blp again; the program will give an error; telling us the file has been changed by the reformating. The game will not recognize this file either. The file I used was a unit icon.
Photoshop can't save CYMK in tga format :(
07-04-2002, 05:32 PM#9
zepir
Photoshop can save to CYMK format. You my need to go somewhere in the menus and say "convert to CYMK format".

-=Zépir oo
07-04-2002, 08:11 PM#10
DJBnJack
Okay... I forgot to mention this:
THIS IS FOR TEXTURES ONLY at the moment...

I don't believe this code works yet (sorry all!)

You can take a look at it (if you're willing) and maybe tell me what's wrong with it... (if you know)
But I don't think I can do this without the retail... I [and all that need this] gotta wait till tomorrow (hopefully)

Greetz,
DJBnJack
07-05-2002, 09:12 PM#11
zepir
I got something that *may* be interesting for you...
Retail BLPs format:

Header:
4 bytes: file ID ("BLP1")
4 bytes: unknown
4 bytes: unknown
4 bytes: image width (little endian)
4 bytes: image height (little endian)
4 bytes: unknown
4 bytes: unknown
4 bytes: data offset (from the begining of the file) (little endian)
60 bytes: unknown
4 bytes: header size "h" (usually 0x0270) (little endian)
"h" bytes: header
...
data offset: raw jpeg data till the end of the file


-=Zépir oo
07-06-2002, 12:31 AM#12
DJBnJack
Thanx!
I bought the retail today, and have made a [truely] working .blp <-> .tga (with GUI)

Check out this thread for more info.

Greetz,
DJBnJack