Return to Website

MWGraphics Forum

none

MWGraphics Forum
Start a New Topic 
Author
Comment
View Entire Thread
Re: bmptoanys

I found that, in the .bmp image that gets translated from the DXT1 image, the alpha areas are not absolute green but have a Red component of 20. Is that intentional? The Green is 255 and Blue is 0 as expected.

It would be relatively easy to convert those green areas to pure black. So you're saying that, if they are true black, that alpha mask info will show up in the converted DXT1? If that's the case, my problem is solved.

Re: Re: bmptoanys

Hmmmm.. well it should be 0,255,0. Unless some gremlins have sneaked into the code

Any pure black (0,0,0) in a source image should be translated to alpha when converyting to DXT1

bmptoanys

Martin, thanks for the prompt replies. Your addons are wonderful and have saved a ton of coding. Does DXTBMP have command line options? That would be a wonderful addition to be able to shell out and run that program putting in things such as input file, output file and format, alpha import file name, etc.

Art

Re: bmptoanys

DXTBmp only has the basic commandline option of "filename". So it can be used by the Windows "open" and "open with" options.

However the devpack examples show how easy it is to write simple commandline programs that can do pretty much anything with image files. See also the "Targa to Extended Bmp" cli program on my beta page. This was done with about 30 lines of C and uses just one mwgfx function. It could easily be expanded to take 2 bmp import files (main and alpha), create a Targa and output a selected format.
There are just so many possibilities that it is far easier for individual developers to create the code that does just what they want rather than me try to do a general "all purpose" program.

Re: Re: bmptoanys

Thanks Martin. I've never played with Targa files before so I just have a bit of hesitancy in jumping into them but I'll just bite the bullet and see where I can go with them today. Graphics programming is all very new to me but extremely fun. I'm amazed at the results I can get with just a few lines of code and routines such as yours and others I've found online. My next challenge is truly understanding the underlying complexity of image structures and API functions you're calling to get the results you do.

Thanks for all your support.

Art