<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JPEG save corrupted in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836792#M5992</link>
    <description>Hello, I have a very simple program in linux.&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt; "HELLO!"&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; string image="/home/ferru001/gray_images/00000052.jpg";&lt;BR /&gt; CIppImage gray_image;&lt;BR /&gt; CStdFileInput in;&lt;BR /&gt; CStdFileOutput out;&lt;BR /&gt; in.Open(image.c_str());&lt;BR /&gt; PARAMS_JPEG m_param_jpeg;&lt;BR /&gt; JERRCODE jerr;&lt;BR /&gt; m_param_jpeg.nthreads=1;&lt;BR /&gt; m_param_jpeg.use_qdct=false;&lt;BR /&gt; m_param_jpeg.quality=100;&lt;BR /&gt; jerr = ReadImageJPEG(in,m_param_jpeg,gray_image);&lt;BR /&gt; in.Close();&lt;BR /&gt; if( JPEG_OK == jerr ) {&lt;BR /&gt;  cout &amp;lt;&amp;lt; "JPEG READ OK" &amp;lt;&amp;lt; endl;&lt;BR /&gt;  cout &amp;lt;&amp;lt; "WRITING JPEG" &amp;lt;&amp;lt; endl;&lt;BR /&gt;  out.Open( "/home/ferru001/graytest.jpg" );&lt;BR /&gt;  jerr = SaveImageJPEG ( gray_image, m_param_jpeg, out );&lt;BR /&gt;  out.Close();&lt;BR /&gt;  if( JPEG_OK == jerr ){&lt;BR /&gt;   cout &amp;lt;&amp;lt; "SAVE SUCCESS!" &amp;lt;&amp;lt; endl;&lt;BR /&gt;  }else{&lt;BR /&gt;   cout &amp;lt;&amp;lt; "SAVE FAILED"&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;  }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the ReadImageJPEG and SaveImageJPEG are form UIC.&lt;BR /&gt;&lt;BR /&gt;The outputted image comes out corrupt. Only a segment of it is written and when I open it in GIMP the following comes up:&lt;BR /&gt;&lt;BR /&gt;Corrupt JPEG data: 15046 extraenous bytes after marker 0xd9 EXIF data will be ignored&lt;BR /&gt;&lt;BR /&gt;Corrupt JPEG data: found marker 0xd9 instead of RST0&lt;BR /&gt;&lt;BR /&gt;Corrupt JPEG data: premature of data segment.&lt;BR /&gt;&lt;BR /&gt;Any ideas why this is happening? Am I forgetting to do something?&lt;BR /&gt;&lt;BR /&gt;thanks!&lt;BR /&gt;</description>
    <pubDate>Mon, 18 Apr 2011 19:04:59 GMT</pubDate>
    <dc:creator>alessandroferrucci</dc:creator>
    <dc:date>2011-04-18T19:04:59Z</dc:date>
    <item>
      <title>JPEG save corrupted</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836792#M5992</link>
      <description>Hello, I have a very simple program in linux.&lt;BR /&gt;&lt;BR /&gt;cout &amp;lt;&amp;lt; "HELLO!"&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; string image="/home/ferru001/gray_images/00000052.jpg";&lt;BR /&gt; CIppImage gray_image;&lt;BR /&gt; CStdFileInput in;&lt;BR /&gt; CStdFileOutput out;&lt;BR /&gt; in.Open(image.c_str());&lt;BR /&gt; PARAMS_JPEG m_param_jpeg;&lt;BR /&gt; JERRCODE jerr;&lt;BR /&gt; m_param_jpeg.nthreads=1;&lt;BR /&gt; m_param_jpeg.use_qdct=false;&lt;BR /&gt; m_param_jpeg.quality=100;&lt;BR /&gt; jerr = ReadImageJPEG(in,m_param_jpeg,gray_image);&lt;BR /&gt; in.Close();&lt;BR /&gt; if( JPEG_OK == jerr ) {&lt;BR /&gt;  cout &amp;lt;&amp;lt; "JPEG READ OK" &amp;lt;&amp;lt; endl;&lt;BR /&gt;  cout &amp;lt;&amp;lt; "WRITING JPEG" &amp;lt;&amp;lt; endl;&lt;BR /&gt;  out.Open( "/home/ferru001/graytest.jpg" );&lt;BR /&gt;  jerr = SaveImageJPEG ( gray_image, m_param_jpeg, out );&lt;BR /&gt;  out.Close();&lt;BR /&gt;  if( JPEG_OK == jerr ){&lt;BR /&gt;   cout &amp;lt;&amp;lt; "SAVE SUCCESS!" &amp;lt;&amp;lt; endl;&lt;BR /&gt;  }else{&lt;BR /&gt;   cout &amp;lt;&amp;lt; "SAVE FAILED"&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;  }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the ReadImageJPEG and SaveImageJPEG are form UIC.&lt;BR /&gt;&lt;BR /&gt;The outputted image comes out corrupt. Only a segment of it is written and when I open it in GIMP the following comes up:&lt;BR /&gt;&lt;BR /&gt;Corrupt JPEG data: 15046 extraenous bytes after marker 0xd9 EXIF data will be ignored&lt;BR /&gt;&lt;BR /&gt;Corrupt JPEG data: found marker 0xd9 instead of RST0&lt;BR /&gt;&lt;BR /&gt;Corrupt JPEG data: premature of data segment.&lt;BR /&gt;&lt;BR /&gt;Any ideas why this is happening? Am I forgetting to do something?&lt;BR /&gt;&lt;BR /&gt;thanks!&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Apr 2011 19:04:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836792#M5992</guid>
      <dc:creator>alessandroferrucci</dc:creator>
      <dc:date>2011-04-18T19:04:59Z</dc:date>
    </item>
    <item>
      <title>JPEG save corrupted</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836793#M5993</link>
      <description>By the way I'm using IPP 6.1 thanks.</description>
      <pubDate>Mon, 18 Apr 2011 19:11:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836793#M5993</guid>
      <dc:creator>alessandroferrucci</dc:creator>
      <dc:date>2011-04-18T19:11:23Z</dc:date>
    </item>
    <item>
      <title>JPEG save corrupted</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836794#M5994</link>
      <description>Can you try to reproduce these steps with UIC applications (either picnic or uic_transcoder_con)? Will you get corrupted image with these applications as well?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir</description>
      <pubDate>Mon, 18 Apr 2011 21:47:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836794#M5994</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2011-04-18T21:47:20Z</dc:date>
    </item>
    <item>
      <title>JPEG save corrupted</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836795#M5995</link>
      <description>I tried picnic and the same thing does not happen. The image saved comes out fine.</description>
      <pubDate>Mon, 18 Apr 2011 22:33:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836795#M5995</guid>
      <dc:creator>alessandroferrucci</dc:creator>
      <dc:date>2011-04-18T22:33:28Z</dc:date>
    </item>
    <item>
      <title>JPEG save corrupted</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836796#M5996</link>
      <description>Hello,&lt;BR /&gt;I re-wrote my small program to include more JPEG_PARAMS:&lt;BR /&gt;&lt;BR /&gt;params_jpeg.color = (nChannels == 1) ? JC_GRAY : (nChannels == 3) ? JC_YCBCR : JC_YCCK;&lt;BR /&gt; params_jpeg.comment_size = 0;&lt;BR /&gt; params_jpeg.huffman_opt = 0;&lt;BR /&gt; params_jpeg.mode = JPEG_BASELINE;&lt;BR /&gt; params_jpeg.point_transform = 0;&lt;BR /&gt; params_jpeg.predictor = 0;&lt;BR /&gt; params_jpeg.quality = 100;&lt;BR /&gt; params_jpeg.restart_interval = 0;&lt;BR /&gt; params_jpeg.sampling = JS_444;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;now it works fine... not sure why not setting these params resulted in corrupt JPEG...&lt;BR /&gt;&lt;BR /&gt;thank you Vlad for responding to me.</description>
      <pubDate>Mon, 18 Apr 2011 23:37:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836796#M5996</guid>
      <dc:creator>alessandroferrucci</dc:creator>
      <dc:date>2011-04-18T23:37:01Z</dc:date>
    </item>
    <item>
      <title>JPEG save corrupted</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836797#M5997</link>
      <description>You are welcome :)&lt;BR /&gt;&lt;BR /&gt;I think if you left same parameters not initialized they may influence the codec behaviour.&lt;BR /&gt;For example, if JPEG comments control parameters are not zero then encoder will try to embedd comment string into encoded JPEG (and if these parameters not initialized properly comment will be taken from random memory address or comment string will have random length)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir</description>
      <pubDate>Fri, 22 Apr 2011 09:33:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/JPEG-save-corrupted/m-p/836797#M5997</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2011-04-22T09:33:45Z</dc:date>
    </item>
  </channel>
</rss>

