Re: opacity
Glenn Randers-Pehrson <[email protected]> Fri, 28 May 2004 08:15:31 -0400
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <[email protected]> |
At 01:04 PM 5/28/2004 +0100, Patrick Welche wrote: >On Wed, May 26, 2004 at 12:39:27PM -0400, Glenn Randers-Pehrson <glennrp> wrote: >> If mask.png is an opaque grayscale image, >> then composite will use its intensity when it wants opacity. >> >> gm convert skill.eps -matte skill_with_matte.miff >> gm composite -compose copyopacity null: skill_with_matte.miff mask.png out.png > >Thank you for the recipe - now I wonder if there isn't something up with >gm display.. > >I enclose out.png which was created with: > > gm convert -matte logo.eps logo.png > gm convert mask.eps mask.png > gm composite -compose copyopacity mask.png logo.png out.png > >and I was confused by the outcome, because gm display out.png shows >a ragged circular outline. The whole point of using the mask, was >essentially to use the automatic antialiasing of the mask to get >semitransparent pixels and avoid seeing the pixelation. I just >viewed out.png with firefox on a windoze box, and the outline is >smooth. Bringing up the magnifier in gm display shows cells with >rgba values like (255,255,255,17) so the image really is semitransparent >(though I didn't realise at first), and I was also confused by gm >identify -verbose out.png with > > Colors: 3 > > 3120: ( 0, 0, 0, 0) black > 160: (102,102,102, 0) grey40 > 6720: (255,255,255,255) #FFFFFFFF > >which doesn't give the game away about the non 255 values in the >alpha channel.. > >Anyway, it all works in the sense that image is what I wanted. >(I can now just weep because the most popular browser can't display it) > >Cheers, > >Patrick > >PS could gm display's output have something to do with my X setup? > > depth of root window: 24 planes > number of colormaps: minimum 1, maximum 1 > default colormap: 0x20 > default number of colormap cells: 256 > preallocated pixels: black 0, white 16777215 > >seems there are enough colours available.. > >Attachment Converted: "c:\documents and settings\owner\old_disks\gateway c\eudora\attach\out1.png" This file looks fine to me under FireFox 0.8 and Mozilla-1.7rc1 When I use a dark background, the circle is clearly nice and round, antialiased. I never had much luck with either GM display or IM display and semitransparent images; they always thresholded the alpha channel down to binary on my platforms. Glenn ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click