discuss-gnustep
[Top][All Lists]
Advanced

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

Re: [Q] Trasparent Tiff drawing on Windows.


From: Fred Kiefer
Subject: Re: [Q] Trasparent Tiff drawing on Windows.
Date: Tue, 06 Jul 2004 03:01:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114

MA Garcias wrote:
After some try, I didn't get transparent tiff drawing work right in the
win32 backend. Actually, making alpha blending work (for the
NSCompositeSourceOver operation, which is 90% of the image drawing) was
quite simply, just using AlphaBlend instead of BitBlt. Found two
problems though:
1 - the standard tiff images in the gnustep distribution work fine with
alpha blending, with their alpha channel correctly interpreted, but
somehow the red and blue channels are swapped. When trying to set proper
masks in the GSCreateBitmap function, the results are much worse.
2 - other tiff images (like the ones generated with Paint or other win32
image tools) are drawn with oversaturated values, so that the image
appears almost (or completely) white. Again, the color masks in the
BITMAPV4HEADER struct seem to be completely useless to fix it. Anyway,
it seems that the tiff library doesn't load correctly all tiff formats
(or maybe the win32 tools don't stick to standard?).
Anyway, you can find a patch in the attached file so that you people can
play around (I'm not releasing it officially because of the poor
results). Please report if you get any results.


I did apply this patch, to prevent other people to try the same. About half a year ago I wrote exaclty the same code with the same results, but only documented this with a mail not in the code. Thats why you and S.J.Chun had to go through the same experiance. At that time I came to the conclusion that only the switch to GDI++ would help. Perhaps somebody will find a different solution, now that they don't have to start from scratch.

Fred




reply via email to

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