Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!voder!pyramid!prls!philabs!nori!jcm From: jcm@nori.Philips.Com (John Martin) Newsgroups: comp.windows.news Subject: Re: width and height of canvases? Message-ID: <44722@philabs.Philips.Com> Date: 15 Feb 89 15:22:02 GMT References: <44718@philabs.Philips.Com> Sender: news@philabs.Philips.Com Reply-To: jcm@nori.UUCP (John Martin) Organization: Philips Laboratories, Briarcliff Manor, NY Lines: 27 In article <44718@philabs.Philips.Com> I write: >I would like to find out the width and height of an SRF image that has been >read with readcanvas. Does anyone know how to do this? >For example, after the line: > > (/c3/jcm/images/car.im8) readcanvas > >the new canvas is on the stack, and I would like to know what aspect ratio >to use in displaying it before I pass it to imagecanvas. In case anyone is interested, one possible way is: (/c3/jcm/images/car.im8) readcanvas dup setcanvas initclip clippath pathbbox /height exch def /width exch def pop pop imagecanvas Thanks to Laura Appleton, who (ironically) sits 50 feet away. John Martin Philips Labs jcm@philabs.philips.com