I am converting PWG raster files (size in KBs) into Postscript using the colorimage command. The raster file data is being represented as hexadecimal in PS files. How ever the problem is, the generated PS files are about 500 MB in size. I want a method using which the size of these PS files will be reduced significantly without disturbing the quality of output. Sample file I have given below:
%!PS-Adobe-3.0
%%BoundingBox: 0 0 4958 7017
%Creator: Cups-Filters
%LanguageLevel: 2
%DocumentData: Clean7Bit
%EndComments
%BeginProlog
%EndProlog
%Pages: (atend)
%%Page: 1 1
%%BeginPageSetup
<< /PageSize[4958 7017] >> setpagedevice
%%EndPageSetup
gsave
gsave
4958 7017 scale
4958 7017 16 [4958 0 0 -7017 0 7017]
{currentfile 4958 string readhexstring pop} bind
false 4 colorimage
...hexadecimal information cut...
grestore
showpage
%PageTrailer
%Trailer
%%Pages: 1
%EOF
The above file is a PS representation of raster file which has CMYK color model and 16 bits for each color. The size of the raster file 278.5 KB while the above mentioned file is 563.8 MB, with 99% space occupation by the hexadecimal data.