Subject: FVWM: Icon as button 1 pixmap? revisited.

From: David Johnson <[email-masked]>
Date: Tue, 7 May 1996 22:49:24 -0400 (EDT)

I was clearing out some of my old saved messages, and came across
something like, "it won't be too hard to impliment in the next version
(pre-x.42)" in reply to the request to allow the button 1 to be the pixmap
of the icon already assigned by the style lists.  This doesn't seem to
have been implimented, and I was wondering if it had been dropped or
forgotten.  I remember there was discussion about active scaling of the
pixmap, so it would fit as a button without having to create a new file,
and having to tell fvwm about two separate styles, one for the icon, and
one for the button.

David Johnson				http://tiberius.ec.rhno.columbia.edu
[email-masked]			    Columbia College, New York 10027
[email-masked]			   H: (212) 853-4863
				      ~~Have a day.~~

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

---

From: Andrew Veliath <[email-masked]>
Date: Wed, 8 May 1996 15:02:28 -0400

David> about active scaling of the pixmap, so it would fit as a
    David> button without having to create a new file, and having to
    David> tell fvwm about two separate styles, one for the icon, and

The main problem with this is that anti-aliasing must be performed
(since you are discretely sampling the original).  Otherwise there is
always a chance that the reduced pixmap might not look anything like
the original, or at least contain artifacts.  There are different
things one can do to try and minimize aliasing effects though.

Andrew

---

From: Dan Espen <[email-masked]>
Date: Wed, 08 May 1996 15:32:53 -0400

----------
> things one can do to try and minimize aliasing effects though.

I hate to be discouraging, but...

I  drew some mini  xpms  a while ago,  and  in my opinion, the average
60x50 pixmap just isn't going to look like anything when it is reduced
to 14x14.  There just aren't enough pixels there.

I found that with    the mini xpms,   I  just had to  draw   something
different to get the idea across when the size went down that much.

Try showing  some of your  favorite icons with xv,  and then ask xv to
resize it to 14x14.  What I found is 9 times out  of 10, it was just a
blur when I was done.  And when I tried to  use that blur in xpaint, I
often found there was no way to repair it.

--
Dan Espen                                    Phone: (908) 699-5570
[email-masked]
444 Hoes Lane  Room RRC 1C-214
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: <[email-masked]> (Charles Hines)
Date: Wed, 8 May 1996 15:41:54 -0400

>>>>> "AV" == Andrew Veliath <[email-masked]> writes:
>>>>> "DJ" == David Johnson <[email-masked]> writes:

DJ> I was clearing out some of my old saved messages, and came across
DJ> something like, "it won't be too hard to impliment in the next
DJ> version (pre-x.42)" in reply to the request to allow the button 1
DJ> to be the pixmap of the icon already assigned by the style lists.
DJ> This doesn't seem to have been implimented, and I was wondering if
DJ> it had been dropped or forgotten.  I remember there was discussion
DJ> about active scaling of the pixmap, so it would fit as a button
DJ> without having to create a new file, and having to tell fvwm about
DJ> two separate styles, one for the icon, and one for the button.

AV> The main problem with this is that anti-aliasing must be performed
AV> (since you are discretely sampling the original).  Otherwise there is
AV> always a chance that the reduced pixmap might not look anything like
AV> the original, or at least contain artifacts.  There are different
AV> things one can do to try and minimize aliasing effects though.

I don't intend to include anything like this into fvwm.  If people
want to put a mini version of the icon as button 1, they can make a
mini pixmap themselves to put there.  I don't feel it's necessary to
go through the computational effort to create a mini version on the
fly, as it will serve to only slow down & bloat fvwm, which as you all
know I'm trying hard not to let happen.

The only 'drawback' to them doing it themselves right now is that it
would have to be the same xpm for every window, since the buttons are
global and not per window.  I don't know if they ever will be window
specific either.

Chuck

---

From: kendrick vargas <[email-masked]>
Date: Wed, 8 May 1996 14:53:42 -0400 (EDT)

> often found there was no way to repair it.

I don't wanna sound like I know anything (cause I dont :)... I am no
proggrammer, I just subscribed to the list because I like using fvwm and
wanna hear the latest new... 
	As for the minimizing of pixmaps, I have found that its all in the
algorithm used. No offense, but I found XV to be a really crappy resizer
when it comes to resizing anything. The best I've found (and I swear by
it) is the tool called imgworks which comes standard as an SGI tool. I
haven't resized anything that small, but I figure it would probably look
better when resized using imgworks than xv...
			-peace

--====----====----=== http://www.fiu.edu/~kvarga01 ===----====----====--

-- IRC : Drama -- This Space Intentionally Left Blank - [email-masked] --

---

From: kendrick vargas <[email-masked]>
Date: Wed, 8 May 1996 14:53:42 -0400 (EDT)

---

From: Mirai <[email-masked]>
Date: Wed, 08 May 1996 14:59:24 -0500 (CDT)

I think that you'll find that most of these tiny icons
are drawn by graphic designers pumped up on double-lattes
and $90/hour salaries.

No amount of blurring can save you against them.

therefore, I humbly recommend against having this feature.
although it is a nice once, Macs do it too (not just
win95)....

Jim

http://www.mirai.com/wks

---

From: Hector Peraza <[email-masked]>
Date: Thu, 9 May 1996 11:17:39 +0200 (MET DST)

> although it is a nice once, Macs do it too (not just

When rescaling down a pixmap by a non-integer number of times several
problems arise. For example, the geometry for the different objects in the
image changes in a differnt way depending of their location. The
inclinated and diagonal lines are distorted, circles and curves look
specially bad. Here helps the aliasing operation. Again, the aliasing
operation is simplified when rescaling an integer number of times (and
preferably a power of 2). A product of the aliasing process is an
increased number of colors of the resulting pixmap, that would use more
entries in the colormap table, so the color usage should be truncated to a
given set of colors. 

Win95 uses icons of *fixed* size 32x32, and mini-icons of 16x16. So the
rescale factor for each coordinate is always 2, is equal and symetric for
each pixel, so the resulting pixmap looks better than, for example, when
resizing a pixmap of 64x64 or 34x44 or any other odd geometry down to
14x14 or 16x14. Not to mention that the calculations for the first case
are greatly simplified. Win95 uses also a fixed set of 16 colors for icons
and mini-icons, so the aliasing operation never generates more than these
colors. 

The Win95 executable format includes anyway a mini-con resource, so if it
exists will be used (a mini-icon drawn by hand will always look better
than the resized one). Otherwise, as for the old applications, the resized
old icon is used. 

In my opinion, a compromise solution for fvwm would be sufficient. For
example, the user could specify explicitly a mini-icon for certain
application windows using the Style command, when the resize operation
generates ugly or unrecognized icons; the same option could use a
UseAppIcon modifier or something like that if the user wants to use the
application builtin icon. 

Regards,
Hector Peraza.