This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Pixel Modulation


Pixel Modulation

Postby drgoldie » Dec 12, 2003 @ 6:00pm

drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Pixel Modulation

Postby Dave H » Dec 12, 2003 @ 7:25pm

Last edited by Dave H on Dec 12, 2003 @ 7:31pm, edited 1 time in total.
Dave H.
Lead Programmer (Repton PPC/7650)
[url=http://www.handango.com/PlatformProductDetail.jsp?productId=43741]
Buy Repton Online here!
[/url]
User avatar
Dave H
pm Member
 
Posts: 164
Joined: Oct 3, 2002 @ 5:01pm


Postby Phantom » Dec 12, 2003 @ 7:30pm

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Postby Dan East » Dec 12, 2003 @ 8:20pm

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Exocet » Dec 12, 2003 @ 11:56pm

Exocet
pm Member
 
Posts: 18
Joined: Jun 29, 2003 @ 2:24am
Location: Toronto, Canada


Postby drgoldie » Dec 13, 2003 @ 10:28am

drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby Dave H » Dec 14, 2003 @ 3:22am

Dave H.
Lead Programmer (Repton PPC/7650)
[url=http://www.handango.com/PlatformProductDetail.jsp?productId=43741]
Buy Repton Online here!
[/url]
User avatar
Dave H
pm Member
 
Posts: 164
Joined: Oct 3, 2002 @ 5:01pm


Postby Dan East » Dec 14, 2003 @ 5:36am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Dave H » Dec 15, 2003 @ 11:17am

Dave H.
Lead Programmer (Repton PPC/7650)
[url=http://www.handango.com/PlatformProductDetail.jsp?productId=43741]
Buy Repton Online here!
[/url]
User avatar
Dave H
pm Member
 
Posts: 164
Joined: Oct 3, 2002 @ 5:01pm


Postby drgoldie » Dec 15, 2003 @ 11:59am

drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby hm » Dec 30, 2003 @ 7:34am

User avatar
hm
pm Member
 
Posts: 201
Joined: Dec 28, 2003 @ 8:47pm
Location: Seattle, WA


Postby xor » Sep 21, 2007 @ 6:34pm

xor
pm Member
 
Posts: 1
Joined: Sep 21, 2007 @ 6:17pm


Postby brendan » Sep 26, 2007 @ 1:58am

Hi all, been a Long long time since I've posted....

I'm looking into creating transparency masks for my objects and im wondering whats the best way to go about it?

atm I'm using gzipped tga files because there easy to use, with a mask color for full transparency. Has anyone written any png librarys? as they have blending transparently etc?

thanks in advance.
User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby j.edwards » Sep 26, 2007 @ 12:34pm

I had a play with png but found it a bit complicated for me - I'm simple. Plus I think it added a few hundred kb to the exe but that could have been because I built the entire thing instead of just support for what I needed. If you get png working well with a small footprint I would like to hear how you did it.

Instead, I ended up building a little win32 command line utility that converted png files with alpha channel into my own encoded format that included the alpha channel and with pixel format in 16bit565 already so no conversion was required at the ppc side. Works really well. The encoder/decoder only has about a 2kb footprint and is really fast, with the compromise being images are larger than they could have been if png, but hasn't been an issue so far. If you had a lot of rich images that need to be alpha blended then png would probably be a good option.

Another option could be to store the alpha as a separate resource in your own custom way and merge it with the pixel data when the image is loaded. I would suspect the alpha data would compress well using a simple run length encoding.

In any case you will need to build additional rendering capabilities to account for the alpha channel (assuming you are not using some library that has it already). I chose to store the alpha value with each pixel as opposed to in a separate block of memory but I don't know if that's better or worse.

There was another thread where Torus??? (I think - going back a bit now) posted how to do alpha blending with a few bitwise and a single mul which to this day I'm thankful for. If you can't find it I can post some code. Correct me if I'm wrong but the option of doing a single mul with 64bit is really bad - the Torus way (I hope it wasn't someone else :)) did it with a single mul and all 32bit - lightning fast. In fact the app I'm working on at the moment I originally stayed away from anything alpha blended but performance is so good that the entire screen pretty much is now a product of heaps of alpha blended images.
User avatar
j.edwards
pm Member
 
Posts: 240
Joined: Oct 29, 2003 @ 11:09am
Location: Australia


Postby mm40 » Sep 26, 2007 @ 3:26pm

it depends what kind of alpha you want, if you just need 1 bit of alpha then just use a colorkey, if you need 8 bits then either use a separate 8 bit image (bmp or tga), or tga supports color and alpha and is by far the easiest to use. just use whatever is easiest, dont worry about the size, with storage cards over 4GB these days worring about the size is a waste of time.
User avatar
mm40
pm Member
 
Posts: 135
Joined: Feb 21, 2003 @ 9:11pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron