discuss-gnustep
[Top][All Lists]
Advanced

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

Re: compositing PNGs with alpha


From: Fred Kiefer
Subject: Re: compositing PNGs with alpha
Date: Tue, 23 Jan 2007 17:05:03 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20060911)

Paddy Smith schrieb:
> Hi,
> 
> I have code like
> 
>        NSImage *imgTest1=[[NSImage alloc] initWithContentsOfFile:
> @"test1.png"];
>        NSImage *imgTest2=[[NSImage alloc] initWithContentsOfFile:
> @"test2.png"];
>        NSRect myRect = NSMakeRect(0,0,100,100);
>        [imgTest1 drawInRect: myRect
>                    fromRect: myRect
>                   operation: NSCompositeCopy
>                    fraction: 1.0];
>        [imgTest2 drawInRect: myRect
>                    fromRect: myRect
>                   operation: NSCompositeSourceOver
>                    fraction: 1.0];
> 
> but the semi-transparent pixels in imgTest2 do not render as I would
> hope (they are multi-coloured!), although the rest (fully opaque
> and fully transparent pixels) render as I would expect.
> 
> I saw bug #15903, but it really isn't obvious whether this is the same
> issue.
> 
> I tried digging around for GraphicsCompositing and setting it in
> my defaults, but I don't really get what's going on there, and I
> understood it was the default?
> 
> same old question really: am I missing something or doing it wrong ?
> 

There is a very simple answer to your question: If this problem also
shows up with the cairo backend, then it is a general issue. If the
output from this backend looks correct, then the problem is caused by
the drawing code in your current backend, most likely art.
Please report back to the list, which of these was the case. If you need
further instruction about compiling and using the cairo backend, feel
free to ask me directly.

Cheers,
Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]