From: Mathieu Bouchard Date: 2002-01-28T03:07:42+09:00 Subject: Re: looking for an example problem to demonstrate TaskMaster On Fri, 25 Jan 2002, Phil Tomson wrote: > Mathieu Bouchard wrote: > >f = IO.popen "xv -","w" > >f.puts "P6", "256 256", "255" > >(0...256).each {|y| > > (0...256).each {|x| > > f.printf("%c%c%c",x&y,x^y,x|y) }} > >this generates a munch pattern if you have the 'xv' program installed. you > >may try other (more familiar) formulae... > Hey, that's pretty cool! I had to install xv, though. xv isn't too > popular anymore (probably due to it's licensing) - does would this work > with the gimp as well? According to the title on the xv window it's a PNG > - what's a PPM? XV is shareware with source provided, and unmaintained since late 1994. It uses its own GUI toolkit (in other words it's based directly on Xlib). After the final 3.10a version, one last version was released independently: it's the one that has PNG support added (PNG was created in 1994, and took a few years to become popular). That one is identified "3.10a(PNG)". With all the anti-shareware zealots on earth there isn't one who wrote something significantly close to John Bradley's XV, using whatever pre-written GUI toolkit you can imagine. They either are half-assed attempts that miss the important features, or in the case of the GIMP, it's a software with a much larger scope and much longer loadtime and still missing the features that are more specific to a *viewer*. GIMP 1.2 here takes forever to load and *can't* be piped to (i tried "gimp -" and "gimp -- -" and "gimp /dev/stdin"). GIMP 1.4 I can't tell: I heard it's got a much better loadtime, but I still don't know whether you can pipe. PPM is two of the six extremely simple formats defined by the NetPBM package that is installed on many Linux systems (and elsewhere). Basically, PBM is for two-tone pictures, PGM is for greyscale pictures, and PPM for RGB pictures, none of which are indexed-color. All three come in two subvariants, one strictly text (decimal numbers), and one binary with a text header. ________________________________________________________________ Mathieu Bouchard http://hostname.2y.net/~matju