<?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 You may want to look at UIC in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952838#M18745</link>
    <description>&lt;P&gt;You may want to look at UIC sample (JPEG2000 codec) and to use it as is, or as a base of your own modification.&amp;nbsp;&lt;A href="http://software.intel.com/en-us/articles/code-samples-for-intel-integrated-performance-primitives-intel-ipp-library-71"&gt;http://software.intel.com/en-us/articles/code-samples-for-intel-integrated-performance-primitives-intel-ipp-library-71&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sergey&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2013 10:15:13 GMT</pubDate>
    <dc:creator>Sergey_K_Intel</dc:creator>
    <dc:date>2013-07-17T10:15:13Z</dc:date>
    <item>
      <title>writing/creating a jpeg image on disk</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952831#M18738</link>
      <description>&lt;P&gt;I am a newcomer to the Intel IPP world. I am working in Visual C++. The code I'm working on performs certain manipulations on C++ arrays. After performing all these manipulations which use many IPP functions like FFT, Convert and so on, I'd like to write the array as an image to file. So far, I've succeeded in using ippiEncodeLoadCodeBlock_JPEG2K_32s_C1R and ippiEncodeStoreBits_JPEG2K_1u&amp;nbsp;to encode the array to jpeg. The example in the IPP documentation illustrates that the encoded array can be written to file thus&lt;/P&gt;
&lt;P&gt;fwrite(pDst, sizeof(Ipp8u), sizeof(pDst), FILE* file);&lt;/P&gt;
&lt;P&gt;However, though the imagefile is created on disk and it has a non-zero size(some 60KB), I'm not able to view the image.&lt;/P&gt;
&lt;P&gt;Can somebody please tell me what is wrong and how to correct it?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 06:37:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952831#M18738</guid>
      <dc:creator>Lis</dc:creator>
      <dc:date>2013-07-17T06:37:58Z</dc:date>
    </item>
    <item>
      <title>Hi Lis,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952832#M18739</link>
      <description>&lt;P&gt;Hi Lis,&lt;/P&gt;
&lt;P&gt;I wonder how you were able to get 60 KB of file :). You should get 4/8-byte long file. Because sizeof(pDst) is usually 4/8 depending on architecture used. You should know the size of your output data. What is the last IPP function you are using to fill pDst buffer? What destination parameters does it have?&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sergey&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 07:12:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952832#M18739</guid>
      <dc:creator>Sergey_K_Intel</dc:creator>
      <dc:date>2013-07-17T07:12:55Z</dc:date>
    </item>
    <item>
      <title>Hi Sergey,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952833#M18740</link>
      <description>&lt;P&gt;Hi Sergey,&lt;/P&gt;
&lt;P&gt;Thanks for replying. I'm attaching the code block&lt;/P&gt;
&lt;P&gt;status = ippiEncodeInitAlloc_JPEG2K(&amp;amp;pState, imgsize); &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;status = ippiEncodeLoadCodeBlock_JPEG2K_32s_C1R(psrc, 256*sizeof(Ipp32s), imgsize, pState, ippWTSubbandLxLy, 16, ippMQTermSimple, ippMQRateApprGood, IPP_JPEG2K_USE_SEGMENTATION_SYMBOLS, &amp;amp;psfbits, &amp;amp;nOfpasses, &amp;amp;nOfTermPasses);&lt;/P&gt;
&lt;P&gt;status = ippsConvert_32s32f_Sfs(psrc, pnewsrc, 256*256, 0);&lt;BR /&gt; status = ippsConvert_32f8u_Sfs(pnewsrc, pDst, 256*256, ippRndNear, -2);&lt;/P&gt;
&lt;P&gt;int isNotFinish = 1;&lt;BR /&gt; while(isNotFinish)&lt;BR /&gt; {&lt;BR /&gt; int len = sizeof(pDst);&lt;BR /&gt; ippiEncodeStoreBits_JPEG2K_1u(pDst, &amp;amp;len, pState, &amp;amp;isNotFinish);&lt;/P&gt;
&lt;P&gt;FILE* outfile&amp;nbsp;= fopen("D:image1.jpg", "wb");&lt;BR /&gt; fwrite(pDst, sizeof(Ipp8u), len, outfile);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I'm not sure about some of the parameters supplied to&amp;nbsp;&amp;nbsp;ippiEncodeLoadCodeBlock_JPEG2K_32s_C1R; subband, magnBits, mqTermType,&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;codeStyleFlags are all assumptions. I've tried going through the documentation time and again but my understanding is not complete so I had hoped that if I could atleast get an image, even if it is somehow wrong, I would be able to tweak the parameters and correct it.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 08:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952833#M18740</guid>
      <dc:creator>Lis</dc:creator>
      <dc:date>2013-07-17T08:40:00Z</dc:date>
    </item>
    <item>
      <title>There's a sample at http:/</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952834#M18741</link>
      <description>&lt;P&gt;There's a sample at&amp;nbsp;&lt;A href="http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch15/functn_EncodeStoreBits_JPEG2K.html#ex15-7"&gt;http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch15/functn_EncodeStoreBits_JPEG2K.html#ex15-7&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;[cpp]&lt;/P&gt;
&lt;P&gt;int isNotFinish = 1;&lt;BR /&gt;while(isNotFinish)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; int len = BUFFER_LEN;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ippiEncodeStoreBits_JPEG2K_1u(buffer, &amp;amp;len, state, &amp;amp;isNotFinish);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // You can write compressed data to the output stream, for example:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // fwrite(buffer, sizeof(Ipp8u), len, file);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;[/cpp]&lt;/P&gt;
&lt;P&gt;Look how "len" is used. Before calling EncodeStoreBits it contains the length of buffer (BUFFER_LEN). It can be 1024, 2048, whatever. In your example you take len=sizeof(pDst). If "pDST" is a result of some "pDst = malloc(your_buffer_len)" statement, this is not correct. You should use "your_buffer_len" as initializer for "int len" variable within inner loop.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sergey&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 08:56:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952834#M18741</guid>
      <dc:creator>Sergey_K_Intel</dc:creator>
      <dc:date>2013-07-17T08:56:34Z</dc:date>
    </item>
    <item>
      <title>As you can see, pDst is not</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952835#M18742</link>
      <description>&lt;P&gt;As you can see, pDst is not the result of some malloc statement. pDst is my array so when I take its size, it's giving me array size in bytes right?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 09:04:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952835#M18742</guid>
      <dc:creator>Lis</dc:creator>
      <dc:date>2013-07-17T09:04:16Z</dc:date>
    </item>
    <item>
      <title>Last minute thoughts. I haven</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952836#M18743</link>
      <description>&lt;P&gt;Last minute thoughts. I haven't tried this, but you may not get the image. You may get only compressed bits of an image. It's like JPEG file without internal format headers, footers etc. To have full-functional compressed image, which can be viewed by any image viewer, you need to add standard format records, describing the compressed data, that you have.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sergey&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 09:09:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952836#M18743</guid>
      <dc:creator>Sergey_K_Intel</dc:creator>
      <dc:date>2013-07-17T09:09:48Z</dc:date>
    </item>
    <item>
      <title>Hi Sergey,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952837#M18744</link>
      <description>&lt;P&gt;Hi Sergey,&lt;/P&gt;
&lt;P&gt;Yes, I was afraid that might be the case! I suppose Ipp does not have any functions that might give me a "viewable" image file? Or any documentation to say what headers to be added for the type of encoding I'm using - Entropy encoding?&lt;/P&gt;
&lt;P&gt;Thanks a lot&lt;/P&gt;
&lt;P&gt;Lis&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 09:19:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952837#M18744</guid>
      <dc:creator>Lis</dc:creator>
      <dc:date>2013-07-17T09:19:53Z</dc:date>
    </item>
    <item>
      <title>You may want to look at UIC</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952838#M18745</link>
      <description>&lt;P&gt;You may want to look at UIC sample (JPEG2000 codec) and to use it as is, or as a base of your own modification.&amp;nbsp;&lt;A href="http://software.intel.com/en-us/articles/code-samples-for-intel-integrated-performance-primitives-intel-ipp-library-71"&gt;http://software.intel.com/en-us/articles/code-samples-for-intel-integrated-performance-primitives-intel-ipp-library-71&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sergey&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 10:15:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952838#M18745</guid>
      <dc:creator>Sergey_K_Intel</dc:creator>
      <dc:date>2013-07-17T10:15:13Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...I was afraid that might</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952839#M18746</link>
      <description>&amp;gt;&amp;gt;...I was afraid that might be the case! I suppose Ipp does not have any functions that might give me a "viewable"
&amp;gt;&amp;gt;image file...

You could verify your jpg-file if it has a header. Just open it as a binary in any editor and if this is a correct jpg-file it should have a signature &lt;STRONG&gt;JFIF&lt;/STRONG&gt; at the beginning of the file ( positions from 7 to 10 ).</description>
      <pubDate>Wed, 17 Jul 2013 12:51:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952839#M18746</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-07-17T12:51:44Z</dc:date>
    </item>
    <item>
      <title>Hi Lis,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952840#M18747</link>
      <description>&lt;P&gt;Hi Lis,&lt;/P&gt;
&lt;P&gt;Why don't you use OpenCV to write.It is really a good friend with IPP when you need opening or writing image files after or before&amp;nbsp; processing with ipp.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Adem Metin CALI&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2013 19:30:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/writing-creating-a-jpeg-image-on-disk/m-p/952840#M18747</guid>
      <dc:creator>adem_metin_cali</dc:creator>
      <dc:date>2013-08-31T19:30:53Z</dc:date>
    </item>
  </channel>
</rss>

