On Oct 6, 11:27 pm, Mike Russell <group... at (no spam) MOVEcurvemeister.com
wrote:
On Tue, 6 Oct 2009 18:34:03 -0700 (PDT), Fguy wrote:
Greetings.
I have a series of files that I captured from websites and saved in
png format. Chess pieces actually. They are relatively simple shapes
that are either white with a black background or black with a white
background.
I wish to make the backgrounds transparent, I suppose by setting an
alpha component to zero. This would enable me to drag the pieces
around on the screen in my computer chess program I am writing,
without obscuring what lies underneath the background of each piece.
Can I do this with photoshop elements 5.0? I don't need a specific how
to, though it would be nice. If someone could just point me in the
right direction, I would be most grateful.
Elements is limited in the types of transparency information it can save.
Cutting to the chase, here's one way to accomplish what you need to do.
1) re-design your pieces so that the black pieces have a white border, and
the white pieces have a black border. This is necessary so that the pieces
will show up on both color of square.
2) save a white on black silhouette version of each *type* of piece. These
are the masks. Note that you only need a mask for each of the 6 types of
chess piece.
3) when your software displays the piece, supply the image and mask to the
bitblt function.
--
Mike Russell -http://www.curvemeister.com
Thanks Mike, for the tips, I can tell you that adding borders for the
pieces is not needed, because my square colors are are light gray and
and a darker grey, and solid black and white shows up fine. I am
working in java, and right now what I have done is created blank
transparent BufferedImages from within java, then drawing black and
white geometric shapes on to the transparent background. If you are
interested to see what I have now, it's all on my website,
http://sites.google.com/site/fchess09/
Anyways, I'll look into your suggestions as time permits and let you
know how it turns out.
regards.