all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* png images in tool-bar / alpha mask
@ 2008-04-01 17:14 David Reitter
  2008-04-01 21:41 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 16+ messages in thread
From: David Reitter @ 2008-04-01 17:14 UTC (permalink / raw)
  To: emacs- devel

I'm trying to use PNG images with alpha information in the tool-bar  
and find that the mask / alpha is ignored:

(find-image (list  (list :type 'png :file "undo.png")))

i.e. I'm not setting a ":mask 'heuristic" property here.  The  
background just appears white.

This is with the new toolkit toolbars (under Carbon), but I remember  
having such problems with the non-toolkit toolbar as well.
`image-make-p' generally returns nil for PNGs.

It seems that "image_load_quartz2d" is used to load the file (in  
image.c).  This already determines some background colors and draws it  
into a new graphics context, with the background color present.  And  
then it doesn't actually store the original image data, but creates an  
XCreatePixmap.  (A mask is handled separately.)

Would the solution be to also store the original image data  
(CGImageRef) in the "struct image", and then to simply use that when  
defining the toolbar, if it is present and if the toolkit supports it?

As is probably obvious, I'm not familiar with how this is generally  
handled in Emacs, but if someone could provide a bit of guidance, I  
could try to make it work.




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-04-06 14:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-01 17:14 png images in tool-bar / alpha mask David Reitter
2008-04-01 21:41 ` YAMAMOTO Mitsuharu
2008-04-01 23:10   ` David Reitter
2008-04-02 12:39     ` YAMAMOTO Mitsuharu
2008-04-03 15:09       ` David Reitter
2008-04-03 21:15         ` YAMAMOTO Mitsuharu
2008-04-03 21:42           ` David Reitter
2008-04-03 21:55             ` YAMAMOTO Mitsuharu
2008-04-03 22:42               ` David Reitter
2008-04-03 23:12                 ` YAMAMOTO Mitsuharu
2008-04-04 11:24                   ` David Reitter
2008-04-04 12:20                     ` YAMAMOTO Mitsuharu
2008-04-05 10:58                       ` David Reitter
2008-04-06  2:52                         ` YAMAMOTO Mitsuharu
2008-04-06 13:42                           ` David Reitter
2008-04-06 14:09                             ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.