|
From: Benjamin L. <lin...@gm...> - 2009-02-25 20:57:28
|
Hello, I am trying to enhance the image capabilities of the postscript terminal. I'd like to add basically two new features *) compression of image data for the /FlateDecode filter as avilable in PS Level 3 (using libz) *) Binary enconding of image data The objective is to significantly reduce the size of the output file with image data in it. So I wanted to ask the developers here, if such additions would be of interest to be added to the gnuplot sources? Implementing these features would require quite some changes in the current postscript image code, in order to disentangle the three steps 1) pack image data in a bit-tight manner 2) (possibly) compress the packed data 3) encode the (possibly) compressed data which are currently done all-in-one in PS_encode_image() So instead of throwing around with large patches, I'd thought I'd ask beforehand ... My idea would be to add new options to the postscript terminal ) "level2" to set PS level to 2 (the current default), an alias of "leveldefault" ) "level3" to enable PS Level 3 related features ) "imgcompression" to define whether to compress the image data (currently only inflate/deflate) ) "imgencoding" to define which method of encoding should be used (hex, ascii85 or binary) The default settings should resemble the current behaviour, i.e. "level2 imgcomression none imgencoding ascii85" I could provide currently an implementation for inflate/deflate image compression and binary image encoding. By changing the postscript image code structure it should then be relatively easy to later add different compression methods or encoding methods (if of interest) comments? benjamin |