Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - May 31 2004 : 11:25:02 AM
|
JPGs compression is very bad if you want colorkey values. Some of the colors will be blended, and the texture will look very strange...
About the compression... I have no idea, that is what happened when I "save as..." in PSP. I don't have the TGA compression software/algorithm, so I don't know how to compress it...
|
|
|
masterbooda
Swordmaster
277 Posts |
Posted - May 31 2004 : 11:43:51 AM
|
I was wondering about .png alpha channels, because in paintshop you can use a mask to create the alpha channel into the .png, and it becomes part of the image. Anybody who has worked with macromedia flash, will know that you can use .png's and they will be displayed with the alpha channel. So I am wondering if there is a way to create, lets say a .dds image on the fly, by bringing out the alpha channel in directx8. This way all the images you will need will be .png files.
DaBooda out.. |
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jun 01 2004 : 2:55:47 PM
|
I have a question... What is a .dds file? I realize it is an image file, but I cannot find a program that supports it (PSP, photo editor, MS Paint, etc.). I am confused, and I am sorry if this sounds very "noobish"... |
|
|
masterbooda
Swordmaster
277 Posts |
Posted - Jun 01 2004 : 3:34:12 PM
|
A .dds file can only, as far as I know be made with the dxtex tool, that comes with the directx 8 sdk.... It takes two bitmaps, one of the image, then one of the alpha, which is a grayscale image, with white being solid and black being transparent, and the values in between being variations of the in between... It is a nice little format, because you can have textures in your program with variable alpha... and you can also ignore color keying and all that, it is what I like to use, but like I mentioned earlier, the size is just a little bigger than a bitmap, so they take up quite a bit of room... so if I have two png's representing one image, maybe I can create the alpha channel on the fly from two images, because 2 png's are even smaller than .dds....
DaBooda out.. |
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jun 01 2004 : 4:53:24 PM
|
OK, that makes sense... Anyway, are you going to try and make your own parser, or just loop through with getPixel (or something). Either way, it will take a while for large images, but as long as you are not running them during the game loop... |
|
|
masterbooda
Swordmaster
277 Posts |
Posted - Jun 01 2004 : 6:26:01 PM
|
I figured I would have a set up program, that will convert all the images and save them to a folder, this way it will be a one time deal. And they can then run the game using those images. Also the set up will delete the png's. With this method, the export size of the game will not be that large, but the program set up on hard drive will be large.
DaBooda out
|
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jun 01 2004 : 9:02:14 PM
|
I would like to point out that .pngs are only compressed (zipped) 5% of more than they are normally, meaning they are very compact... compare that with a .bmp - 96%!!! |
Edited by - Sr. Guapo on Jun 01 2004 9:03:10 PM |
|
|
Almar
Moderator
Netherlands
192 Posts |
Posted - Jun 02 2004 : 02:34:44 AM
|
in PSP7 you have something like "Options" when saving TGA.. :)
btw: Try compress a BMP, I thought it will be quite the same as PNG. |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jun 02 2004 : 09:06:45 AM
|
Interesting... I zipped both a 32X32 .png and a 32X32 .bmp... originally, the bitmap was 3126 bytes, and the PNG was 313 bytes. After zipping, the PNG was 309 bytes, and the bitmap was 129 bytes!
Yes, those numbers are correct... It seems a bitmap is alot smaller once compressed by winzip than a PNG... |
|
|
VBBR
Moderator
Brazil
617 Posts |
Posted - Jun 02 2004 : 3:29:02 PM
|
But which is faster to load, a PNG or a BMP (decompressed on-the-fly) ? |
Whatever. Who knows... |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jun 02 2004 : 3:33:32 PM
|
find out... Use QueryPerformanceCounter and have fun. There is a good tutorial on using it here. It is really easy. I'm just too lazy during summer vacation... |
Edited by - Sr. Guapo on Jun 02 2004 3:34:05 PM |
|
|