Re: [GD-Windows] Image formats (was [Algorithms] Scrolling starfield)
Brought to you by:
vexxed72
From: Javier A. <ja...@py...> - 2002-07-31 15:00:09
|
Andrew Grant <ag...@cl...> wrote: > What formats are people using for images these days? We're currently > using TGA which "suffices" but isn't great due to Adobe less than > embracing the concept of alpha channels. Sad to see we're not the only ones bitten by Adobe's TGA zealotism. I had a few and completely unproductive email exchanges with Adobe about this, in the end I gave up talking to them, and our artists simply continued working with Photoshop 6. > Ideally I'd like something that > > Supports an alpha channel > Supports 32, 24, & 8 bit images > > I'm not sure if anything out there actually fits the bill for this > though. I've thought about writing a plugin for Photoshop to > supported saving to targa's that fit the above, but it looks like a > whole lot of pain. There are two things that can be of great help: 1 - Photoshop 7's TGA loader will load the image's alpha channel into a channel if you hold the ALT key while it does the loading. By default it will load the alpha channel into the layer transparency. It always saves the alpha from the layer opacity, so if you have your alpha in a separate channel, you must perform a couple steps (select from alpha, delete from layer). 2 - Using Image | Calculations, you can create a Photoshop action that will remove the layer transparency and put it into an alpha channel. I tried to write a plugin to perform this in a cleaner way, but failed miserably (couldn't even get the sample code to work, and again Adobe's support was worse than unproductive). We did (2) while using Photoshop 6, and along with 7's ALT-while-loading hack, makes things more useable if you adapt your working habits to it. Theory says that the PNG format is much better, but: - The complexity of the format makes for less immediate tools, link with zlib & libpng, test the varieties of the image pixelformat, all that crap. - Forget about loading PNGs during runtime on a PS2. - A full TGA loader is just a few hundred lines of straightforward code. - Dark stories about Adobe's PNG support being equally full of quirks abound. Javier Arevalo Pyro Studios |