attachment-0001

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><base href="x-msg://4/"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Andale Mono";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Michael,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for your reply. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I have been able to parse the PWG-raster file successfully to obtain plain RGB data &#8211; but only from the one, present in the directory &#8220;PWGRasterSamples&#8221; obtained from : <a href="http://ftp.easysw.com/pub/cups/examples/PWGRasterSamples.zip">http://ftp.easysw.com/pub/cups/examples/PWGRasterSamples.zip</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The specific PWG raster file used is : &#8220;img_6461.jpg-srgb-8-150dpi.pwg&#8221;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I was able to write the parser based on the specifications described in the PWG draft document.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I tried using &#8220;Rasterview&#8221; from </span><a href="http://www.easysw.com/~mike/rasterview/">http://www.easysw.com/~mike/rasterview/</a> <span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>running on Ubuntu 10.10, to open the file mentioned above, &#8220;img_6461.jpg-srgb-8-150dpi.pwg&#8221;. I received an error, &#8220;Unable to read page data: Resource temporarily unavailable&#8221;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Using the tools/maketestfiles.sh, I was able to create a raster file with magic number, &#8220;3SaR&#8221; and not &#8220;RaS2&#8221;, which I don&#8217;t think is a PWG raster (?). I used the pstoraster filter. This generated file opens fine with RasterView v1.2.1. , FYI.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I was able to &#8220;/fetch&#8221; a pwg raster file from Google Cloud Print (GCP), by creating a print job from a pdf file. (location of pdf file: </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="ftp://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippraster10-20110327-rev.pdf">ftp://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippraster10-20110327-rev.pdf</a>). </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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 &#8211; was not decoded, and appeared as &#8216;0x00&#8217; for the remainder of the raster data.)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Are there different versions of the PWG raster file?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Perhaps GCP is not using the latest PWG specifications? <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Is RasterView not updated to parse the latest PWG files?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Roy Samuel.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Michael Sweet [mailto:msweet@apple.com] <br><b>Sent:</b> Sunday, May 01, 2011 6:02 AM<br><b>To:</b> Roy Samuel<br><b>Cc:</b> ipp@pwg.org<br><b>Subject:</b> Re: Question on PWG draft specification mismatch &amp; parsing<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=MsoNormal>On Apr 28, 2011, at 9:46 PM, Roy Samuel wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span class=apple-style-span><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>...</span></span><o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span class=apple-style-span><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>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 &#8216;NumColors&#8217;.</span></span><span class=apple-style-span><span style='font-size:13.5pt;font-family:"Andale Mono","serif"'><o:p></o:p></span></span></p><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>&nbsp;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>--1--<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>According to the draft document, bytes 420-423 need to contain &#8216;NumColors&#8217; value, however, I found them to be zero. Are the sample files outdated??<o:p></o:p></span></p></div></div></blockquote><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><p class=MsoNormal>Not exactly outdated, just the code that generated them (and the page headers) contains an error. I will post updates next week.<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-style-span><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>&nbsp;</span></span><o:p></o:p></p></div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>--2--<o:p></o:p></span></p></div></div><p class=MsoNormal><span class=apple-style-span><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>...</span></span><o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span class=apple-style-span><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>(I use GIMP to open the output raster file in RAW mode).</span></span><span class=apple-style-span><span style='font-size:13.5pt;font-family:"Andale Mono","serif"'><o:p></o:p></span></span></p><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>I have attached a screenshot of the output file that I&#8217;m able to view through GIMP (scaled down version).</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Is my algorithm wrong? Or are the specs incorrect?<o:p></o:p></span></p></div></div></blockquote><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><p class=MsoNormal>I would suspect the former since the compression code that generated the files has been in use for many years now.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Another tool you can use is RasterView, available here (with source):<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>&nbsp; &nbsp; <a href="http://www.easysw.com/~mike/rasterview/">http://www.easysw.com/~mike/rasterview/</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>__________________________________________________<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>Michael Sweet, Senior Printing System&nbsp;Engineer, PWG Chair<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div><br />-- 
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</body></html>
<table><tr><td bgcolor=#ffffff><font color=#000000><pre>______________________________________________________________________________
 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@celstream.com immediately.
______________________________________________________________________________</pre></font></td></tr></table>