From: Bee on
Mike - thanks.

Yes, I want to know the why and how.

The user of my app will be doing all the grunt work.

This is what I have now.
This works but is not all that I want.
I load a user selected image into picbox. This is the positive.
I change all pure black to almost black; one bit different.
I tell the user to make all transparent areas pure black; drawn by hand or
if lucky it is already black.
I then process this and make a second image, the mask, changing the all
black to all white.
I then BitBlt the mask then the positive into the location chosen by the user.
This all works.
I have sizing handles on the view portion of this sprite on the background
that the user can use to size with or without aspect maintianed.

This is what I ultimately want.
I load a user selected image into picbox. This is the positive.
Have the user select a Xcolor to use other than black to paint the
transparent areas.
I change all that Xcolor to almost that Xcolor; one bit different.
I tell the user to make all transparent areas that Xcolor; drawn by hand or
if lucky it is already Xcolor.
I then process this and make a second image, the mask, changing the all
Xcolor to all complement (or whatever works).
The user select an alpha value 0-100.
I then BitBlt the mask then the positive using the alpha into the location
chosen by the user.
Sizing handles too.

Using colors for the transparency area is not mandatory, but the alpha is so
if I cannot do colors with alpha, I will settle for alpha with black and
white.

From: Bee on
As far as I have gone, it does not seem that the mask needs a "hole".
The image can be on the mask too.
Just the transparency areas need to be complement colors.

From: Mike Williams on
"Bee" <Bee(a)discussions.microsoft.com> wrote in message
news:E75F1BE1-290A-492D-B287-6D6559B13ED0(a)microsoft.com...

> This is what I ultimately want.
> I load a user selected image into picbox.

What kind of image? What are the filetypes you are going to be dealing with?

Mike



From: Bee on
Whatever can be loaded into a picbox.
But I will be saving the sprite pos and mask as bitmaps BMP for later use.
So there should be no concern about image degradation or slight color shifts
if that is your worry.
These will be small BMP resultant files. Typically 1M or less.


"Mike Williams" wrote:

> "Bee" <Bee(a)discussions.microsoft.com> wrote in message
> news:E75F1BE1-290A-492D-B287-6D6559B13ED0(a)microsoft.com...
>
> > This is what I ultimately want.
> > I load a user selected image into picbox.
>
> What kind of image? What are the filetypes you are going to be dealing with?
>
> Mike
>
>
>
> .
>
From: Mike Williams on
"Bee" <Bee(a)discussions.microsoft.com> wrote in message
news:A9FCF81A-88A9-4F96-97F2-F5EF41DF2208(a)microsoft.com...

> As far as I have gone, it does not seem that the
> mask needs a "hole". The image can be on the
> mask too. Just the transparency areas need to
> be complement colors.

That'll be because you are blitting your sprite onto an area of solid colour
that does not contrast too much (bitwise) with the main body colours of your
sprite. Try blitting it onto various other solid colours, or better still
onto a background picture, and you will clearly see the problem with that
method which at the moment just happens to be hiding from you. Stick with
the proper mask.

Mike


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: Simple Obfuscation
Next: Flag test