comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Device's bits_per_pixel keyword
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Device's bits_per_pixel keyword [message #13517 is a reply to message #13455] Fri, 13 November 1998 00:00 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Charles Cavanaugh <cavanaug@nicole.eos.ucar.edu> writes:


> --------------9F3C599E53254C11EEDF762F
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

> I have a program that generates color postscript plots, and I want to make the files
> smaller. I have tried :

> set_plot, 'PS'
> device, bits_per_pixel = 2
> .
> .
> .
> device, /close

> but the file generated is only very slightly smaller than when I do not use the
> bits_per_pixel keyword. I've also tried bits_per_pixel = 1, 4 and 8, but the file
> size change is so very slight (and in some cases larger then when the keyword
> is not used).

> If anyone has been able to generate considerably smaller postscript files by using
> the bits_per_pixel keyword, please let me know how to do that. Thank you.

> I'm using IDL 5.1 on an SGI workstation running IRIX 6.5.1.


The BITS_PER_PIXEL keyword can be used to generate smaller PostScript files, in
the sense of how much disk space the file takes up. For example, here are the
file sizes of two otherwise identical PostScript files, where bit_per_pixel=8
for the first one and bits_per_pixel=2 for the second one:

-rw-rw-r-- 1 thompson users 2020755 Nov 13 17:27 idl.ps
-rw-rw-r-- 1 thompson users 508255 Nov 13 17:28 idl2.ps

The second file is almost four times smaller, as one would expect. However,
this saving is only realizable for images displayed through TV or TVSCL, or any
other routine which works through shade-rendering. There are no savings to be
made for line-drawn graphics. Also, this savings in disk space comes at a
price. With only 2 bits/pixel, it's only possible to show 4 colors at a time.
(Or 4 shades in each of red, green, and blue for true-color images.) That's a
pretty drastic reduction in image quality.

(This is the case for direct graphics--I'm not sure what the effect would be
for object graphics, but expect the same principles would apply.)

William Thompson
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Unknown #INFO
Next Topic: Unknown #INFO

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 19:33:32 PDT 2025

Total time taken to generate the page: 0.08127 seconds