Path: utzoo!attcan!uunet!jarthur!brutus.cs.uiuc.edu!uakari.primate.wisc.edu!aplcen!haven!umd5!zben From: zben@umd5.umd.edu (Ben Cranston) Newsgroups: comp.lang.postscript Subject: Re: fast rendering of 1-bit deep images Summary: Looks like idtransform scale Message-ID: <6197@umd5.umd.edu> Date: 2 Mar 90 20:33:21 GMT References: <1822@esquire.UUCP> Reply-To: zben@umd5.umd.edu (Ben Cranston) Organization: University of Maryland, College Park Lines: 45 In article <1822@esquire.UUCP> yost@esquire.UUCP (David A. Yost) writes: > Could someone please post a PostScript routine > that will print an m x n one-bit-deep image at > device resolution? Unless you like inverting matrices in Postscript, looks like the best bet is to m n idtransform scale then to image the picture as usual. This version of the Turkey example from page 171 of the Red book or page 149 of the Blue book prints a nice tenth- inch turkey, which is about right (24/300 ~= 1/10...). %! /inch { 72 mul } def /picstr 3 string def /imageturkey { 24 23 idtransform scale 24 23 1 [24 0 0 -23 0 23] {currentfile picstr readhexstring pop} image } def gsave 3 inch 4 inch translate imageturkey FFC4FF FFD8FF FFDB7F F1B6BF EEB6DF EB4DDF C349AF 8A0177 E80073 E8A0EB E3F81D C7FC3B 8FCE7D 071203 4D443D 44907B CE403D E715C3 F1C1FF F803FF FC07FF E1E7FF E007FF grestore showpage -- Sig DS.L ('ZBen') ; Ben Cranston * Network Infrastructures Group, Computer Science Center * University of Maryland at College Park * of Ulm