home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
historic
/
v941.tgz
/
icon.v941src.tar
/
icon.v941src
/
ipl
/
gprogs
/
giftopat.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
1KB
|
47 lines
############################################################################
#
# File: giftopat.icn
#
# Subject: Program to convert GIF image to hex-form pattern
#
# Author: Ralph E. Griswold
#
# Date: May 29, 1999
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program convert GIF images, whose names are given on the command
# line to bi-level patterns. The GIFs are expected to be black and white.
# All non-white pixels are treated as black
#
############################################################################
#
# Requires: Version 9 graphics
#
############################################################################
#
# Links: imsutils, wopen
#
############################################################################
link imsutils
link wopen
procedure main(args)
local file, win
while file := get(args) do {
win := WOpen("image=" || file, "canvas=hidden") | {
write(&errout, "cannot open ", file)
next
}
write(pix2pat(win, 0, 0, WAttrib("width"), WAttrib("height")))
WClose(win)
}
end