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

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

Roy Samuel roy.samuel at celstream.com
Thu May 5 04:42:19 UTC 2011


Hi Michael,

 

Thanks for your reply. 

I have been able to parse the PWG-raster file successfully to obtain
plain RGB data - but only from the one, present in the directory
"PWGRasterSamples" obtained from :
http://ftp.easysw.com/pub/cups/examples/PWGRasterSamples.zip

The specific PWG raster file used is : "img_6461.jpg-srgb-8-150dpi.pwg"

I was able to write the parser based on the specifications described in
the PWG draft document.

 

 

I tried using "Rasterview" from http://www.easysw.com/~mike/rasterview/
running on Ubuntu 10.10, to open the file mentioned above,
"img_6461.jpg-srgb-8-150dpi.pwg". I received an error, "Unable to read
page data: Resource temporarily unavailable"

Using the tools/maketestfiles.sh, I was able to create a raster file
with magic number, "3SaR" and not "RaS2", which I don't think is a PWG
raster (?). I used the pstoraster filter. This generated file opens fine
with RasterView v1.2.1. , FYI.

 

I was able to "/fetch" a pwg raster file from Google Cloud Print (GCP),
by creating a print job from a pdf file. (location of pdf file:
ftp://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippraster10-20110327-rev.pdf). I was
not able to open this PWG raster file, with RasterView, nor was I able
to parse this file completely using the parser that was developed based
on PWG draft specifications. (I was able to obtain about 1/6th of the
file converted to RGB data successfully, the rest - was not decoded, and
appeared as '0x00' for the remainder of the raster data.)

 

Are there different versions of the PWG raster file?

Perhaps GCP is not using the latest PWG specifications? 

Is RasterView not updated to parse the latest PWG files?

 

Regards,

Roy Samuel.

 

From: Michael Sweet [mailto:msweet at apple.com] 
Sent: Sunday, May 01, 2011 6:02 AM
To: Roy Samuel
Cc: ipp at pwg.org
Subject: Re: Question on PWG draft specification mismatch & parsing

 

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.

 

	--2--

	...

	(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?

 

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

 


______________________________________________________________________________
 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 
 administrator at celstream.com immediately.
______________________________________________________________________________

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pwg.org/pipermail/ipp/attachments/20110505/2df2974d/attachment-0001.html>


More information about the ipp mailing list