Hi,<br><br>   Thank you all once again for giving me valuable suggestions. I modified the previous patch. I attached the new patch with this mail.<br>Iam curiously waiting for to commit my patch.<br><br>Please let me know when you commit this patch.<br>
<br>Thanks<br>--<br>A Srinivas<br><br><div class="gmail_quote">On Wed, Jun 23, 2010 at 12:30 AM,  <span dir="ltr">&lt;<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send poppler mailing list submissions to<br>
        <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:poppler-owner@lists.freedesktop.org">poppler-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of poppler digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. poppler/GfxState.cc (Albert Astals Cid)<br>
   2. Branch &#39;poppler-0.14&#39; - poppler/GfxState.cc (Albert Astals Cid)<br>
   3. Re: Patch go Get PDF ID (Albert Astals Cid)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 21 Jun 2010 12:38:22 -0700 (PDT)<br>
From: <a href="mailto:aacid@kemper.freedesktop.org">aacid@kemper.freedesktop.org</a> (Albert Astals Cid)<br>
Subject: [poppler] poppler/GfxState.cc<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:20100621193823.4F08210057@kemper.freedesktop.org">20100621193823.4F08210057@kemper.freedesktop.org</a>&gt;<br>
<br>
 poppler/GfxState.cc |   12 ++++++------<br>
 1 file changed, 6 insertions(+), 6 deletions(-)<br>
<br>
New commits:<br>
commit 38e5d28a184d0ca8df71a7ea910ce85d7a225e4e<br>
Author: Albert Astals Cid &lt;<a href="mailto:aacid@kde.org">aacid@kde.org</a>&gt;<br>
Date:   Mon Jun 21 20:38:00 2010 +0100<br>
<br>
    more pow 0.5 -&gt; sqrt<br>
<br>
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc<br>
index 7140efc..fe3ee77 100644<br>
--- a/poppler/GfxState.cc<br>
+++ b/poppler/GfxState.cc<br>
@@ -672,9 +672,9 @@ void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {<br>
   r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;<br>
   g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;<br>
   b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;<br>
-  rgb-&gt;r = dblToCol(pow(clip01(r * kr), 0.5));<br>
-  rgb-&gt;g = dblToCol(pow(clip01(g * kg), 0.5));<br>
-  rgb-&gt;b = dblToCol(pow(clip01(b * kb), 0.5));<br>
+  rgb-&gt;r = dblToCol(sqrt(clip01(r * kr)));<br>
+  rgb-&gt;g = dblToCol(sqrt(clip01(g * kg)));<br>
+  rgb-&gt;b = dblToCol(sqrt(clip01(b * kb)));<br>
   rgb-&gt;r = rgb-&gt;g = rgb-&gt;b = clip01(color-&gt;c[0]);<br>
 }<br>
<br>
@@ -1246,9 +1246,9 @@ void GfxLabColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {<br>
   r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;<br>
   g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;<br>
   b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;<br>
-  rgb-&gt;r = dblToCol(pow(clip01(r * kr), 0.5));<br>
-  rgb-&gt;g = dblToCol(pow(clip01(g * kg), 0.5));<br>
-  rgb-&gt;b = dblToCol(pow(clip01(b * kb), 0.5));<br>
+  rgb-&gt;r = dblToCol(sqrt(clip01(r * kr)));<br>
+  rgb-&gt;g = dblToCol(sqrt(clip01(g * kg)));<br>
+  rgb-&gt;b = dblToCol(sqrt(clip01(b * kb)));<br>
 }<br>
<br>
 void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 21 Jun 2010 12:38:48 -0700 (PDT)<br>
From: <a href="mailto:aacid@kemper.freedesktop.org">aacid@kemper.freedesktop.org</a> (Albert Astals Cid)<br>
Subject: [poppler] Branch &#39;poppler-0.14&#39; - poppler/GfxState.cc<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:20100621193848.8814910057@kemper.freedesktop.org">20100621193848.8814910057@kemper.freedesktop.org</a>&gt;<br>
<br>
 poppler/GfxState.cc |   12 ++++++------<br>
 1 file changed, 6 insertions(+), 6 deletions(-)<br>
<br>
New commits:<br>
commit 714db8900b2f72bd63811a16bfb81beb23397bba<br>
Author: Albert Astals Cid &lt;<a href="mailto:aacid@kde.org">aacid@kde.org</a>&gt;<br>
Date:   Mon Jun 21 20:38:00 2010 +0100<br>
<br>
    more pow 0.5 -&gt; sqrt<br>
<br>
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc<br>
index 4f83e61..b59a478 100644<br>
--- a/poppler/GfxState.cc<br>
+++ b/poppler/GfxState.cc<br>
@@ -672,9 +672,9 @@ void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {<br>
   r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;<br>
   g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;<br>
   b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;<br>
-  rgb-&gt;r = dblToCol(pow(clip01(r * kr), 0.5));<br>
-  rgb-&gt;g = dblToCol(pow(clip01(g * kg), 0.5));<br>
-  rgb-&gt;b = dblToCol(pow(clip01(b * kb), 0.5));<br>
+  rgb-&gt;r = dblToCol(sqrt(clip01(r * kr)));<br>
+  rgb-&gt;g = dblToCol(sqrt(clip01(g * kg)));<br>
+  rgb-&gt;b = dblToCol(sqrt(clip01(b * kb)));<br>
   rgb-&gt;r = rgb-&gt;g = rgb-&gt;b = clip01(color-&gt;c[0]);<br>
 }<br>
<br>
@@ -1246,9 +1246,9 @@ void GfxLabColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {<br>
   r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;<br>
   g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;<br>
   b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;<br>
-  rgb-&gt;r = dblToCol(pow(clip01(r * kr), 0.5));<br>
-  rgb-&gt;g = dblToCol(pow(clip01(g * kg), 0.5));<br>
-  rgb-&gt;b = dblToCol(pow(clip01(b * kb), 0.5));<br>
+  rgb-&gt;r = dblToCol(sqrt(clip01(r * kr)));<br>
+  rgb-&gt;g = dblToCol(sqrt(clip01(g * kg)));<br>
+  rgb-&gt;b = dblToCol(sqrt(clip01(b * kb)));<br>
 }<br>
<br>
 void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 21 Jun 2010 23:50:22 +0100<br>
From: Albert Astals Cid &lt;<a href="mailto:aacid@kde.org">aacid@kde.org</a>&gt;<br>
Subject: Re: [poppler] Patch go Get PDF ID<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:201006212350.23148.aacid@kde.org">201006212350.23148.aacid@kde.org</a>&gt;<br>
Content-Type: Text/Plain;  charset=&quot;us-ascii&quot;<br>
<br>
A Dilluns, 21 de juny de 2010, srinivas adicherla va escriure:<br>
&gt; Hi,<br>
&gt;<br>
&gt;     I made some changes to the recent patch. I removed the function<br>
&gt; setID().<br>
&gt;<br>
&gt;<br>
&gt;    Please let me know when you commit this patch.<br>
&gt;<br>
&gt; Thanks &amp; regards<br>
&gt; A Srinivas<br>
<br>
Hi, some minor comments, just for safety<br>
<br>
+  if (obj.isNull())<br>
+  {<br>
+    obj.free();<br>
+    return NULL;<br>
+  }<br>
<br>
should be<br>
<br>
+  if (!obj.isArray())<br>
+  {<br>
+    obj.free();<br>
+    return NULL;<br>
+  }<br>
<br>
And you should be checking that val1 and val2 are strings too before doing<br>
getString().<br>
<br>
And probably you want to call Set instead of append over permanent_id and<br>
update_id.<br>
<br>
Albert<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
poppler mailing list<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
<br>
<br>
End of poppler Digest, Vol 64, Issue 38<br>
***************************************<br>
</blockquote></div><br>