[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compositing PNGs with alpha
From: |
Paddy Smith |
Subject: |
compositing PNGs with alpha |
Date: |
Sun, 21 Jan 2007 22:00:49 +0000 |
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 ?
It's a very minor cosmetic issue for me, but it would be nice to get it working.
Regards,
Paddy
- compositing PNGs with alpha,
Paddy Smith <=