Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!gergle.UUCP!greg From: greg@gergle.UUCP Newsgroups: comp.windows.news Subject: Re: Dithering Message-ID: <8811052016.AA07632@frame.com> Date: 6 Nov 88 05:26:08 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 26 >It's more the "smoothing" between pixels that is disastering our stuff. If you create >a canvas of (basically) random color pixels, when you render a magnified version >you get odd star bursts of colors and other odd things !?! Sometimes we need >to just have pixel replication so we get squares of color. Right now we have >to draw individual squares which tends to be deathly slow. > >Is there anyway to turn off the interpolating feature (?) so we can quickly render >what the computer is taking as random arrays of colors? If you use the NeWS static color table your colors will not be touched. There are 2 ways to get this table, either use adb and grab 256 chars after red_map, blue_map, green_map, or dump a color image file with writecanvas and grab its colortable. If you blow the image up with writecanvas, limit the scale factor to whole integer multiples of the original width and height. Since the Sun implementation simply grabs more pixel as you scale, you will get the affect of enlarged pixels. Note: this has the bad point of making your code specific to a particular NeWS implementation. The correct way would be to enlarge the bitmaps on the client size and send over the images with a 1to1 transformation to screen pixels. -greg.