preetham@chisti.umiacs.umd.edu (Preetham Gopalaswamy) (08/21/89)
I am running HP-UX 6.5 on an HP Series 300 machine. I would like to convert some grey scale pictures (running under X windows) into dithered patterns i.e. x black dots out of n dots represents (x/n)% grey. I need this to display black-white-grey images on a monochrome screen. Are there any standard programs to do this or has any kind soul in netland already written it out for me to use :-) Please respond either by posting on this newsgroup or send me e-mail to either preetham@ra.src.umd.edu or preetham@chisti.umiacs.edu. Thanks for any help. Preetham Gopalaswamy
raveling@venera.isi.edu (Paul Raveling) (08/21/89)
In article <19183@mimsy.UUCP> preetham@chisti.umiacs.umd.edu (Preetham Gopalaswamy) writes: >I am running HP-UX 6.5 on an HP Series 300 machine. I would like to convert >some grey scale pictures (running under X windows) into dithered patterns i.e. >x black dots out of n dots represents (x/n)% grey. I need this to display >black-white-grey images on a monochrome screen. Are there any standard >programs to do this or has any kind soul in netland already written it out for >me to use :-) The imglib library functions available by anonymous FTP from venera.isi.edu include a routine that uses Floyd-Steinberg dithering to translate a color image to a monochrome image. It should be possible to adapt this routine easily or perhaps to use the imglib software as is. Look at function color_to_mono in file imgcvt.c. If your original data is purely grayscale you can eliminate the color-to-grayscale translation for each pixel that precedes dithering and error propagation. To get the imglib software, do an anonymous FTP login to venera.isi.edu and pick up pub/img.tar.Z. To find images using the Img file format, check pub/img_ls-RAlF.Z and images/README. README offers some tips for dealing with the fact that anonymous ftp refuses to show directory listings for the ~ftp/images hierarchy with the "dir" or "ls" commands. ---------------- Paul Raveling Raveling@isi.edu