Subject: [IPP] Question on PWG draft specification mismatch & parsing

From: "Roy Samuel" <[email-masked]>
Date: Fri, 29 Apr 2011 10:16:59 +0530

Hi Michael,

I had downloaded the sample PWGRaster files from: 
http://ftp.easysw.com/pub/cups/examples/PWGRasterSamples.zip, with your
latest working draft of the PWG raster found at: 
ftp://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippraster10-20110327-rev.pdf. I
compared the raster files in the folders:

PWGRasterSamples\srgb-16  &

PWGRasterSamples\srgb-8, with the specs given in the draft document.

I found that neither of the directories contained files that adhered to
the draft document w.r.t parsing the header. Specifically for the value
of 'NumColors'. 

--1--

According to the draft document, bytes 420-423 need to contain
'NumColors' value, however, I found them to be zero. Are the sample
files outdated??

--2--

Based on the decode algorithm given in the draft document, I had tried
to obtain plain RGB raster data from a pwg-raster file. I had converted
the PDF document obtained here: 
http://orenyomtov.com/downloads/testpage.pdf to obtain pwg-raster file
using Google cloud print. I am able to get the pwg-raster file from GCP
successfully. However, on converting the pwg-raster file to RGB data,  I
have been successful in decoding around 1/6th or so, to raster data
successfully, i.e. the top part of the page is being rendered
successfully, while the rest is not rendered.

(I use GIMP to open the output raster file in RAW mode).

I have attached a screenshot of the output file that I'm able to view
through GIMP (scaled down version).

Is my algorithm wrong? Or are the specs incorrect?

Regards.

_________________________________________________

Roy Samuel | Celstream Technologies | www.celstream.com
<http://www.celstream.com/> 

______________________________________________________________________________
 DISCLAIMER: This electronic message and any attachments to this electronic
 message is intended for the exclusive use of the addressee(s) named herein
 and may contain legally privileged and confidential information. It is the 
 property of Celstream Technologies Pvt Limited. If you are not the intended
 recipient, you are hereby strictly notified not to copy, forward, distribute
 or use this message or any attachments thereto. If you have received this
 message in error, please delete it and all copies thereof, from your system
 and notify the sender at Celstream Technologies or 
 [email-masked] immediately.
______________________________________________________________________________

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
ipp mailing list
[email-masked]
https://www.pwg.org/mailman/listinfo/ipp

---

From: Michael Sweet <[email-masked]>
Date: Sat, 30 Apr 2011 17:32:27 -0700

On Apr 28, 2011, at 9:46 PM, Roy Samuel wrote:
> ...
> I found that neither of the directories contained files that adhered to the draft document w.r.t parsing the header. Specifically for the value of ‘NumColors’.
>  
> --1--
> According to the draft document, bytes 420-423 need to contain ‘NumColors’ value, however, I found them to be zero. Are the sample files outdated??

Not exactly outdated, just the code that generated them (and the page headers) contains an error. I will post updates next week.
 
> ...
> I have attached a screenshot of the output file that I’m able to view through GIMP (scaled down version).
>  

I would suspect the former since the compression code that generated the files has been in use for many years now.

Another tool you can use is RasterView, available here (with source):

    http://www.easysw.com/~mike/rasterview/

__________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair