<?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 Re: C# encoder jpeg in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904930#M13295</link>
    <description>&lt;DIV style="margin:0px;"&gt;Hi msjuniorc,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Sorry for inconveniences but some viewers not correctly handle a comment's segment in jpg-files (mspaint says "file's format is not currently supported"). Our encoder writes the COM-marker and length 2. And it's correct. That means there isthe COM-marker and the empty comments. As a workaround you can comment out the WriteCOM function's codes (encoder.cs, line 483). Or add and write your own comment's string after COM-marker. After that mspaint will read jpg-files saving by ttippi sample.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Albert&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Nov 2008 11:25:58 GMT</pubDate>
    <dc:creator>Albert_Stepanov</dc:creator>
    <dc:date>2008-11-17T11:25:58Z</dc:date>
    <item>
      <title>C# encoder jpeg (COM header handled properly by some viewers but not by some others. Workaround provided.)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904926#M13291</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;
&lt;P&gt;thanks to Albert's corrections to the encoder.cs, the ipsp sample can now save consistently jpegs ... but I have found (unfortunately) another problem.&lt;/P&gt;
&lt;P&gt;When opening and saving a jpeg, the output jpeg can be viewed by sompe programs and not by some others.&lt;/P&gt;
&lt;P&gt;For example, while the original can be opened by jpgview.exe (samples) or mspaint, the one saved through the ttippi example cannot. If viewed through jpgview it shows black. If one attempts to view it via mspaint, the latter returns an error and the file can't be opened. Now here is where it gets more complicated, the same file can be viewed through the "windows Picture and Fax Viewer" or the browser (IE and Firefox).&lt;/P&gt;
&lt;P&gt;Attached are two files, now.jpg (the original) and now1.jpg (the saved copy using the example).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thank you in advance for any help,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;msjuniorc&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2008 23:10:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904926#M13291</guid>
      <dc:creator>msjuniorc</dc:creator>
      <dc:date>2008-11-14T23:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904927#M13292</link>
      <description>&lt;P&gt;Please do not start multiple threadswith the same or similar subject -- please aggregate the information toone of them and delete the other two. Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Nov 2008 17:54:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904927#M13292</guid>
      <dc:creator>levicki</dc:creator>
      <dc:date>2008-11-15T17:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904928#M13293</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/61352"&gt;Igor Levicki&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;Please do not start multiple threadswith the same or similar subject -- please aggregate the information toone of them and delete the other two. Thank you.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Hi Igor,&lt;/P&gt;
&lt;P&gt;with all due respect, the reason why this is in a new thread is because I think and hope that this is a different bug from the previous one. At least my initial investigation shows differences in the way the jpeg header are formatted. I have no problem, if this is what the moderators prefer, in merging different issues in a common thread. The intention was, and is, to segregate bugs so not to make any confusion. If it appears, to the reader, that this thread addresses the same issue as the previous ones, I will rephrase this to emphasize the differences. Ultimately, my only wish is to address an issue I have with the aforementioned code. I have no specific preferences about the number of threads and will modify it/them however it is necessary/requested.&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;msjuniorc&lt;/P&gt;</description>
      <pubDate>Sat, 15 Nov 2008 19:50:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904928#M13293</guid>
      <dc:creator>msjuniorc</dc:creator>
      <dc:date>2008-11-15T19:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904929#M13294</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;I have noproblems with separating the issues. I do it as well. However, based on the thread titles your issues sound the same, so you could at least try to think of a better subject.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Nov 2008 19:03:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904929#M13294</guid>
      <dc:creator>levicki</dc:creator>
      <dc:date>2008-11-16T19:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904930#M13295</link>
      <description>&lt;DIV style="margin:0px;"&gt;Hi msjuniorc,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Sorry for inconveniences but some viewers not correctly handle a comment's segment in jpg-files (mspaint says "file's format is not currently supported"). Our encoder writes the COM-marker and length 2. And it's correct. That means there isthe COM-marker and the empty comments. As a workaround you can comment out the WriteCOM function's codes (encoder.cs, line 483). Or add and write your own comment's string after COM-marker. After that mspaint will read jpg-files saving by ttippi sample.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Albert&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2008 11:25:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904930#M13295</guid>
      <dc:creator>Albert_Stepanov</dc:creator>
      <dc:date>2008-11-17T11:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904931#M13296</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Igor,&lt;/P&gt;
&lt;P&gt;point taken. I will extend the subject of this thread to facilitate future research.&lt;/P&gt;
&lt;P&gt;msjuniorc&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2008 16:23:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904931#M13296</guid>
      <dc:creator>msjuniorc</dc:creator>
      <dc:date>2008-11-17T16:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg (COM header handled properly by some viewer</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904932#M13297</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Albert,&lt;/P&gt;
&lt;P&gt;In a few I will try the workaround and will let you know the results. I was thinking of a pre-encoding check (if comment is blank fill it with some string ... sort of) not sure if it would be more elegant/proper to perform this check in the encoder.cs or the ttippi.cs. On a different but related matter, are you maintaining the c# examples? The reason I ask is because I have found a few more "quirks" and would like to know who I can get in contact/collaboration with so to correct as many "quircks" as possible before the next release.&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;
&lt;P&gt;msjuniorc&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2008 16:52:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904932#M13297</guid>
      <dc:creator>msjuniorc</dc:creator>
      <dc:date>2008-11-17T16:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg (COM header handled properly by some viewer</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904933#M13298</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;P&gt;Albert,&lt;/P&gt;
&lt;P&gt;definitively a step forward. The File can now be edited by MSPAINT. Instead of commenting out the entire method I just commented out the calls to it (WriteCOM). I have also noticed code (commented out) that was indeed checking for a value or it would assign a default "versioning" comment. There is still the presence of what seems to be an "extra" header. Its presence does not allow IJL based utilities (i.e. jpgview) to see the image. No errors, but a completely black image. I compared the "good" and the "bad" images and found the following "extra" header in hex:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;PRE&gt;[c-sharp]0b ff c4 00 1f 01 00 03 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0a[/c-sharp]&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thank you in advance,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;msjuniorc&lt;/P&gt;
&lt;P&gt;PS It seems to have something to do with the DefaultChrominanceDCBits and the DefaultLuminanceDCBits.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2008 20:15:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904933#M13298</guid>
      <dc:creator>msjuniorc</dc:creator>
      <dc:date>2008-11-17T20:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg (COM header handled properly by some viewer</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904934#M13299</link>
      <description>&lt;DIV style="margin:0px;"&gt;Hi msjuniorc,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;unfortunately this encoder not absolutely follows the JPEG specification. And IJL viewer follows.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Update please next codes in the sample:&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;//encoder.cs&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;public JPEGEncoder() // line 340&lt;BR /&gt;{&lt;BR /&gt; int i;&lt;BR /&gt; for( i=0; i&lt;MAX_QUANT_TABLES&gt;&lt;/MAX_QUANT_TABLES&gt; {&lt;BR /&gt; m_qntbl&lt;I&gt; = new CJPEGEncoderQuantTable();&lt;BR /&gt; }&lt;BR /&gt; for( i=0; i&lt;MAX_HUFF_TABLES&gt;&lt;/MAX_HUFF_TABLES&gt; {&lt;BR /&gt; m_dctbl&lt;I&gt; = new CJPEGEncoderHuffmanTable();&lt;BR /&gt; m_actbl&lt;I&gt; = new CJPEGEncoderHuffmanTable();&lt;BR /&gt; }&lt;BR /&gt; m_se = 63; // missed data&lt;BR /&gt;}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;JERRCODE WriteCOM() // line 484&lt;BR /&gt;{&lt;BR /&gt; IppLibraryVersion lib = new IppLibraryVersion(ipp.jp.ippjGetLibVersion());&lt;BR /&gt; string comment = "JPEG encoder based on " + new string(lib.Name) + " " + new string(lib.BuildDate);&lt;BR /&gt; int len = comment.Length + 2;&lt;BR /&gt; if (m_dst.currPos + len &amp;gt;= m_dst.DataLen)&lt;BR /&gt; {&lt;BR /&gt; return JERRCODE.JPEG_BUFF_TOO_SMALL;&lt;BR /&gt; }&lt;BR /&gt; m_dst._WRITE_WORD(0xff00 | (int)JMARKER.JM_COM);&lt;BR /&gt; m_dst._WRITE_WORD(len+1);&lt;BR /&gt; for (int i = 0; i &amp;lt; len - 2; i++)&lt;BR /&gt; {&lt;BR /&gt; m_dst._WRITE_BYTE((byte)comment&lt;I&gt;);&lt;BR /&gt; }&lt;BR /&gt; m_dst._WRITE_BYTE((byte)0);&lt;BR /&gt; return JERRCODE.JPEG_OK;&lt;BR /&gt;}&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;P&gt;Sorry forinconveniences.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Albert&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2008 13:58:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904934#M13299</guid>
      <dc:creator>Albert_Stepanov</dc:creator>
      <dc:date>2008-11-18T13:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg (COM header handled properly by some viewer</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904935#M13300</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Albert,&lt;/P&gt;
&lt;P&gt;thank you for the code corrections. I am now able to process jpegs and able to view them via an IJL based utility.&lt;/P&gt;
&lt;P&gt;I am assuming you are the maintainer of the c# sample code. I have identified - but not performed any diagnostic yet - a few more quirks on the ttippi example. For example, if attempting to rotate an image, only a sub section of the complete image (North-West) is processed. A similar behaviour (sub section) can be observed when performing other filter/transformation.&lt;/P&gt;
&lt;P&gt;What is the internal procedure to begin addressing the aforementioned problems?&lt;/P&gt;
&lt;P&gt;Should a new thread (i.e. "c# ttippi.exe bugs and fixes") be started?&lt;/P&gt;
&lt;P&gt;Once again thank you for the solutions already provided and looking forward to begin correction of the other issues.&lt;/P&gt;
&lt;P&gt;msjuniorc&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2008 17:47:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904935#M13300</guid>
      <dc:creator>msjuniorc</dc:creator>
      <dc:date>2008-11-18T17:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg (COM header handled properly by some viewer</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904936#M13301</link>
      <description>&lt;DIV style="margin:0px;"&gt;Hello,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;with this community forum you can reach IPP technical experts to talk on features or issues you met with IPP product. And IPP technical support people also watching this and will submit issue reports into product data base so development team will review and plan work on this. If you have several issues I would recommend you to create separate threads and mark them as an 'Issue report' to signal product technical support service that it is a problem and you expect somewe will follow up on this.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards,&lt;BR /&gt; Vladimir&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2008 18:25:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904936#M13301</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-11-18T18:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: C# encoder jpeg (COM header handled properly by some viewer</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904937#M13302</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/407214"&gt;msjuniorc&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;Albert,&lt;/P&gt;
&lt;P&gt;thank you for the code corrections. I am now able to process jpegs and able to view them via an IJL based utility.&lt;/P&gt;
&lt;P&gt;I am assuming you are the maintainer of the c# sample code. I have identified - but not performed any diagnostic yet - a few more quirks on the ttippi example. For example, if attempting to rotate an image, only a sub section of the complete image (North-West) is processed. A similar behaviour (sub section) can be observed when performing other filter/transformation.&lt;/P&gt;
&lt;P&gt;What is the internal procedure to begin addressing the aforementioned problems?&lt;/P&gt;
&lt;P&gt;Should a new thread (i.e. "c# ttippi.exe bugs and fixes") be started?&lt;/P&gt;
&lt;P&gt;Once again thank you for the solutions already provided and looking forward to begin correction of the other issues.&lt;/P&gt;
&lt;P&gt;msjuniorc&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Dear msjuniorc,&lt;/P&gt;
&lt;P&gt;This sample is example of using the unmanaged IPP functions with the managed callers via the P/Invoke method. It's not the specific purpose application. And for rotating (filtering) an image it showshow tooperate withROI (here roi is 3/4 of the complete image).You free to usethese codes to create your own application what you need.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Albert&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2008 10:02:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/C-encoder-jpeg-COM-header-handled-properly-by-some-viewers-but/m-p/904937#M13302</guid>
      <dc:creator>Albert_Stepanov</dc:creator>
      <dc:date>2008-11-19T10:02:13Z</dc:date>
    </item>
  </channel>
</rss>

