[comp.windows.news] what the hell happened to writecanvas in NeWS 2.0!!!

pablo@ppgbms (Pablo Gonzalez) (04/11/90)

Does anybody know if the raster file generated by the writecanvas primitive 
running under NeWS 2.0 is any different from NeWS 1.1.? If so, what is the
difference.

The reason I ask is that we have noticed a difference in the file sizes
between rester files generated under NeWS 1.1 and the same image generated
under NeWS 2.0. It appears that NeWS 2.0 is compressing it's data.

Here's an example.
Run the following code in an interactive psh under both NeWS's and compare
for your self.

        /xx 300 300 1 [300 0 0 300 0 0] {<00>} buildimage def
        xx setcanvas
        (filename) writecanvas


        Thanks,
        Pablo

P.S. Has any body successfully converted their NeWS 1.1 applications to 
     NeWS 2.0? 

============================================================================
 Pablo Gonzalez              |                                             
 One Campus Drive            |	path ppgbms!moe!pablo@philabs.philips.com  
 Pleasantville, N.Y.  10570  |                                             
 (914) 741-4626              |                                             
============================================================================

naughton@wind.eng.sun.com (Patrick Naughton) (04/12/90)

In article <29898@ppgbms.UUCP>, pablo@ppgbms (Pablo Gonzalez) writes:
> Does anybody know if the raster file generated by the writecanvas primitive 
> running under NeWS 2.0 is any different from NeWS 1.1.? If so, what is the
> difference.
> 
> The reason I ask is that we have noticed a difference in the file sizes
> between rester files generated under NeWS 1.1 and the same image generated
> under NeWS 2.0. It appears that NeWS 2.0 is compressing it's data.
> 
>         Thanks,
>         Pablo

Both NeWS 1.1 and NeWS 2.0 (OpenWindows) write compressed images,
actually run-length byte encoded images.  The size difference you are
seeing is due to the inclusion of the colormap in the NeWS 1.1 image
even though it is one bit deep.  NeWS 2.0 leaves the colormap out of
1 bit deep images thus all mono images 2.0 writes will be 768 bytes
smaller than the 1.1 equivalents.

> P.S. Has any body successfully converted their NeWS 1.1 applications to 
>      NeWS 2.0? 

yes...  Many of the demos shipped with OpenWindows were converted directly
from their NeWS 1.1 predecessors.

    ______________________________________________________________________
    Patrick J. Naughton				    ARPA: naughton@sun.com
    Window Systems Group			    UUCP: ...!sun!naughton
    Sun Microsystems, Inc.			    AT&T: (415) 336 - 1080

pablo@ppgbms (Pablo Gonzalez) (04/12/90)

In article <134314@sun.Eng.Sun.COM>, naughton@wind.eng.sun.com (Patrick Naughton) writes:
> 
> Both NeWS 1.1 and NeWS 2.0 (OpenWindows) write compressed images,
> actually run-length byte encoded images.  The size difference you are
> seeing is due to the inclusion of the colormap in the NeWS 1.1 image
> even though it is one bit deep.  NeWS 2.0 leaves the colormap out of
> 1 bit deep images thus all mono images 2.0 writes will be 768 bytes
> smaller than the 1.1 equivalents.
> 

I would like to first thank you for replying to our article.

We agree with your point regarding the colormap omission in NeWS 2.0.
However, the NeWS 1.1 that we are running does not write the image data in
compressed format. We have  verified this by checking the rasterfile type.
NeWS 1.1 rasterfile type is equal to 1 while NeWS 2.0 type is equal to 2.

P.S. I would like to apologize for the nasty wording in the subject line. It
        was just one of those days.


        Thanks again,
        Pablo

============================================================================
 Pablo Gonzalez              |                                             
 One Campus Drive            |	path ppgbms!moe!pablo@philabs.philips.com  
 Pleasantville, N.Y.  10570  |                                             
 (914) 741-4626              |                                             
============================================================================