Subject: png loader

From: Olivier Chapuis <[email-masked]>
Date: Sat, 30 Mar 2002 07:37:07 +0100

Hello,

I think it will be good that fvwm can load png images. The reason
is that png is a good format and that there is a lot of icons and
mini-icons in such format in the hd of a lot of machine (GNOME
and KDE version > 1 use this format).

One possibility is to use an image library as imlib2. The advantage
is that if we do so fvwm will be able to load image in various
format (as jpg, tiff ...etc). Nevertheless, I do not think that this
is a good idea as IMHO we only need to add support for png image
and we do not need all the goodies of an image library. I mean
that I do not think that fvwm should depends on a given image
library (and we should write ourself our image goodies functions)
and then it will be absurd to use an image library for just loading
png images.

So if there is no objection I will write a png loader (using
libpng) for fvwm (with the help of imlib2 source code).

Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 30 Mar 2002 10:44:41 +0000

> and then it will be absurd to use an image library for just loading

I think imlib is installed on a lot modern systems. But using only libpng
(that is a requirement for imlib anyway) to load png images is good too.
Supporting gif and jpg images would be good, but png is more important.

> libpng) for fvwm (with the help of imlib2 source code).

I am all for adding png support.

Regards,
Mikhael.

---

From: Olivier Chapuis <[email-masked]>
Date: Sat, 30 Mar 2002 15:31:19 +0100

On Sat, Mar 30, 2002 at 10:44:41AM +0000, Mikhael Goikhman wrote:
> I think imlib is installed on a lot modern systems.

Yes, but here my objection:
- imlib is no more under development, it is replaced by imlib2.
- imlib is not used any more in GNOME (version >=2) and has a gtk+
replacement in gtk+-2 (gtk-pixbuf or something like that).
- About imlib2: it seems to me that it is now a pure E library.
So it seems to me that imlib will progressively disappear and that
imlib2 will not have the same universality than imilib.
On the other hand libpng is used by every body.

> But using only libpng

Yes, we may write gif and jpg loader (with libgif and libjpg).
 
> I am all for adding png support.

You will have it in less than 7 days.

Olivier

---

From: "Suzanne Skinner" <[email-masked]>
Date: Sat, 30 Mar 2002 12:43:09 -0500

> and KDE version > 1 use this format).

This sounds awesome to me. I've always wished for proper PNG alpha-bending
in FvwmButtons and the pager mini-icons. Heavily-shadowed Gnome icons
look pretty goofy without it :-)

Suzanne

-- 
[email-masked] - http://www.igs.net/~tril/
"That's when it dawned on me that what I really disliked about procmail was the
recipe format. I didn't want to handle my mail with a collection of colons,
zeroes, and single-letter commands that made sendmail.cf look like a
Shakespearean sonnet."      -- Simon Cozens
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Olivier Chapuis <[email-masked]>
Date: Sat, 30 Mar 2002 20:41:35 +0100

> look pretty goofy without it :-)

Hum, I do not promise alpha rendering (at least for the moment).
The first approach will map the alpha channel (which goes from 0 to 255)
to {0,1} something like: if alpha > 150 then render the point as is if
the alpha <= 150 put the point out of the mask.

Olivier

---

From: "Suzanne Skinner" <[email-masked]>
Date: Sat, 30 Mar 2002 15:11:56 -0500

> the alpha <= 150 put the point out of the mask.

Well, given that foundation to work from, I may be able to hack alpha-blending
myself :-)

Either way, PNG support in Fvwm will be way cool.

Suzanne

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 31 Mar 2002 22:33:42 +0200

> Either way, PNG support in Fvwm will be way cool.

Well, if you have time to spare you could take a look at the
FANCY_TITLE_BAR ifdefs.  I didn't test that at all when I rewrote
the decoration layout code and it's very likely to be completely
broken now :-)

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 31 Mar 2002 22:37:54 +0200

> On the other hand libpng is used by every body.

SOunds like libpng is the way to go.

> Yes, we may write gif and jpg loader (with libgif and libjpg).

Gif and jpeg have a very low priority in my eyes.  There are
hardly andy icons in these formats on the net.  The only module
that would really profit is FvwmBacker - but FvwmBacker can easily
use e.g. xv to display such images in the background.

Bye

Dominik ^_^  ^_^

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 31 Mar 2002 22:30:44 +0200

> libpng) for fvwm (with the help of imlib2 source code).

Of course, I'm against all new features ... ;-)

That is, *unless* we take the chance to clean up the picture
handling code :-)  All that "#ifdef XPM" stuff could really be
moved into a separate library.  How about an Fpicture.c library
with a sub module for xpm and png?

  Fpicture
  |_Fpm
  |_Fpng

As usual, there should be only one fvwm picture structure that
encapsulates all the details about the Xpm and png libraries.  At
present, there are 32 "#ifdef XPM"s in the code :-P

BTW, I prefer to use libpng instead of imlib[2].

Bye

Dominik ^_^  ^_^