On Fri, 31 Mar 2006 12:36:27 +0200
Tomas Gregorovic <[EMAIL PROTECTED]> wrote:
> Mattias Gaertner napsal(a):
>
> >On Thu, 30 Mar 2006 15:23:08 +0200
> >Tomas Gregorovic <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >>Tomas Gregorovic napsal(a):
> >>
> >>
> >>
> >>>>>>>And where do you actually create the alpha mask?
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>I create the aplha mask in function CreateBitmapMask. I draw source
> >>>>>>bitmap to monochromatic mask bitmap using a trick which changes the
> >>>>>>transparent color to white in the mask bitmap. I am not sure if it
> >is >>>>>multiplatform.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>And where is the 8 or 16 bit alpha mask created?
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>I don't know what you are actually asking about. The CreateBitmapMask
> >>>>function creates only 1 bit mask, because it is enough to make one
> >color >>>
> >>>>
> >>>>transparent.
> >>>>
> >>>>Is there some need to create any bit-depth masks?
> >>>>
> >>>>
> >>>I got the bad feeling there is a misunderstanding.
> >>>At the moment the LCL only provides 1 bit transparency. For the LCL it
> >>>does not matter if the alpha channel is separated in a MaskHandle or
> >>>contained in the Handle. The gtk interface uses a combo Handle, while
> >the >>win32 interface uses a separate MaskHandle.
> >>>Of course we want alpha transparency, i.e. >1 bit, which is typically 8
> >>>or 16 bit alpha channel.
> >>>AFAIK the gtk1 does not support 8 bit masks (at least not without
> >>>tricks), but the gtk2 supports them.
> >>>The only missing part is to add 8 bit transparency support to the gtk2
> >>>interface and some properties to TBitmap, so the user can select the
> >>>alpha depth.
> >>>I thought, your patch is starting the latter. But maybe you meant
> >>>something different?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>Maybe. I wanted to implement bitmap color transparency, which is
> >>adjusted through TransparentColor porperty...
> >>
> >>
> >
> >Huh? This already works. What exactly are you trying to implement?
> >
> >
> But from my point of view it doesn't work. I have tested it on several
> various lazarus versions including the latest svn snapshot with attached
> small project and it simply does not function!
> Therefore I had thought it's not implemented and created that patch.
> Maybe it's only some bug occuring on my system.
Thanks. The bitmap is loaded transparent.
I could not test the := Image1.Picture.Bitmap.Canvas.Pixels[X, Y];, as this
does is not yet implemented under gtk1 interface.
You want to switch the transparentcolor, when the image is already loaded,
right?
I implemented that.
Mattias
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives