[vwnc] SVG, Masks and palettes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] SVG, Masks and palettes

Annick
Hi,

I have made an image using SVG, and I would like to generate the  
associated mask to see the background when I move the image.
I can generate a white and black image from the same file which  
reflects exactly the same shape.
I tried to use for the mask
Image>>convertToCoverageWithOpaquePixel: (2 raisedTo: 24)


and OpaqueImage figure:shape:
but it does not work.


Annick Fron


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] SVG, Masks and palettes

Travis Griggs-3
On Oct 31, 2008, at 8:58 AM, Annick Fron wrote:

> Hi,
>
> I have made an image using SVG, and I would like to generate the
> associated mask to see the background when I move the image.
> I can generate a white and black image from the same file which
> reflects exactly the same shape.
> I tried to use for the mask
> Image>>convertToCoverageWithOpaquePixel: (2 raisedTo: 24)
>
>
> and OpaqueImage figure:shape:
> but it does not work.

Annick, can you clarify some of these points for me?

You made an image using SVG. What does that mean? Does that mean you  
created a VisualWorks Image object (i.e. Depth32Image) somehow from  
SVG? Nominally, an SVG derived image would require an alpha channel,  
does your image have that? Or did you flatten that out somehow?

To make the convert work correctly, I would do it like:

anImage convertToCoverageWithTransparentPixel: (anImage pallete  
indexOfPaintNearest: ColorValue white)

or something like that

If, as I say, it's at all interesting as an SVG, you're going to find  
that the lack of alpha is going to give you chunky edges.

--
Travis Griggs
Objologist
"It had better be a pretty good meeting, to be better than no meeting
at all" - Boyd K Packer


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc