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

Re: Transparent images and w3m-image-default-background



In [emacs-w3m : No.11295] antoine.levitt@xxxxxxxxx wrote:
> Some wepages, for instance http://www.phdcomics.com/comics.php and
> http://vidberg.blog.lemonde.fr/ look awful when viewed in w3m inside
> emacs, especially on dark background (set-background-color
> black). Looking in the doc, I thought

> (setq w3m-image-default-background "white")

> would do the trick, but it doesn't change anything. Is it ignored for
> some reason?

> I'm using latest CVS emacs/emacs-w3m.

Hi Antoine,

Try adding this snippet to the ~/.emacs-w3m.el file as a workaround:

(defalias 'w3m-ems-create-image 'create-image)

I realized today that the problem is due to a bug (or an intentional
aim) of Emacs 24.  Emacs-w3m makes `w3m-ems-create-image' an alias
to `create-animated-image' as for Emacs 24, like image-mode.el does,
so as to support animated gif images in addition to still images.
What I noticed today is that `create-animated-image' add the heuristic
mask property to every gif image willy-nilly.  It causes some gif
images to be transparent.  I'll report it to the bug team.

As for `w3m-image-default-background', it will be effective only
to types (i.e. xbm and monochrome pbm) of images of which Emacs
supports the background color.  Sorry.