Re: Question on masking a GDKPixmap



Yes  it is. I have done very little with pix maps are their functions to read each pixel in them. I didn't see any in the docs.  I think I figured out the mask but an automated way to generate it would be for the best.


On 1/19/07, Richard Boaz <riboaz xs4all nl> wrote:
well, the most immediate obvious answer would be to examine each
pixel and if it's white, do with it what you want.

however, this immediately raises the question: how do you know if
white is part of the background or part of the picture?  if your
picture is well-behaved, i.e., the background is wholly outside the
picture itself, then you could use your knowledge of the row-stride
and start at each side, working your way to the middle of the
picture, stopping for that row when you reach a non-white pixel.

is that what you meant?

richard

On Jan 18, 2007, at 5:38 PM, LWATCDR wrote:

> I have loaded a GDKPixmap from a jpg. I would like to make the
> white backgournd out of it before I render it on the screen. Any
> ideas how to do that?
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]