[Top][All Lists]

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

Re: Several suggestions for image support

From: Jason Rumney
Subject: Re: Several suggestions for image support
Date: Fri, 16 Apr 2004 13:50:22 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

Kim F. Storm wrote:

You are right.  Shifting 8 bits here as well on X fixes transparent bg.
I will commit a fix for X shortly.

However, on W32, it seems that it explicitly scales things to 16 bits
in both cases.  I cannot test this on W32, so I cannot say what's
the right thing to do.

The W32 port scales to 16 bits in places because the native Windows COLORREF is 8 bits, while Emacs XColor is 16 bits. So in this case, 8 bits is right, but alpha is currently coming out wrong. I suspect the use of COLOREF instead of XColor that you considered a bug when merging the image code (see comment around that location) was in fact not a bug.

Here is an easy way to test it -- after downloading the image you

(insert-image (create-image "alphatest.png"))

this should result in a light blue image with nice rounded
edges; a darker blue with rough edges indicates a problem.

On Windows the image comes out with a black background and the image has rainbow colored stripes. Non-alpha PNGs look OK.

reply via email to

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