<?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 How to create a bitmap from pixel data in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-create-a-bitmap-from-pixel-data/m-p/876609#M74069</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have installed the LibTIFF freeware and can use it to read TIFF images and write bitmap files (I'm using some C code I found on the Web for this). But what I really want to be able to do is read the TIFF images directly into memory bitmaps for immediate display, etc. The core of the C code I have is:&lt;/P&gt;&lt;DIV style="padding-left: 30px;"&gt;for (j = 0; j &amp;lt; image_width; j++)&lt;/DIV&gt;&lt;DIV style="padding-left: 30px;"&gt;{&lt;/DIV&gt;&lt;PRE&gt;outbuf[j * 3] = TIFFGetB(buf&lt;J&gt;);&lt;/J&gt;&lt;/PRE&gt;&lt;PRE&gt;outbuf[j * 3 + 1] = TIFFGetG(buf&lt;J&gt;);&lt;/J&gt;&lt;/PRE&gt;&lt;PRE&gt;outbuf[j * 3 + 2] = TIFFGetR(buf&lt;J&gt;);&lt;/J&gt;&lt;/PRE&gt;&lt;PRE&gt;}&lt;/PRE&gt;&lt;PRE&gt;fwrite(outbuf, 1, scansize, bmp);&lt;/PRE&gt;&lt;P&gt;which I will ultimately render into Fortran. But how do I write the image to a memory bitmap using these TIFFGetB, etc, functions?This doesn't seem to be a case for using a memory device context and drawing to that. I have seen hints and clues in examples using SetBitmapBits and SetDIBits, but they're all in C, which I really don't understand very well. What I really need is some advice on what is the right approach to take and perhaps a Fortran example. Can anybody help?&lt;/P&gt;&lt;P&gt;With many thanks in advance,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Wed, 01 Oct 2008 06:59:59 GMT</pubDate>
    <dc:creator>michael_green</dc:creator>
    <dc:date>2008-10-01T06:59:59Z</dc:date>
    <item>
      <title>How to create a bitmap from pixel data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-create-a-bitmap-from-pixel-data/m-p/876609#M74069</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have installed the LibTIFF freeware and can use it to read TIFF images and write bitmap files (I'm using some C code I found on the Web for this). But what I really want to be able to do is read the TIFF images directly into memory bitmaps for immediate display, etc. The core of the C code I have is:&lt;/P&gt;&lt;DIV style="padding-left: 30px;"&gt;for (j = 0; j &amp;lt; image_width; j++)&lt;/DIV&gt;&lt;DIV style="padding-left: 30px;"&gt;{&lt;/DIV&gt;&lt;PRE&gt;outbuf[j * 3] = TIFFGetB(buf&lt;J&gt;);&lt;/J&gt;&lt;/PRE&gt;&lt;PRE&gt;outbuf[j * 3 + 1] = TIFFGetG(buf&lt;J&gt;);&lt;/J&gt;&lt;/PRE&gt;&lt;PRE&gt;outbuf[j * 3 + 2] = TIFFGetR(buf&lt;J&gt;);&lt;/J&gt;&lt;/PRE&gt;&lt;PRE&gt;}&lt;/PRE&gt;&lt;PRE&gt;fwrite(outbuf, 1, scansize, bmp);&lt;/PRE&gt;&lt;P&gt;which I will ultimately render into Fortran. But how do I write the image to a memory bitmap using these TIFFGetB, etc, functions?This doesn't seem to be a case for using a memory device context and drawing to that. I have seen hints and clues in examples using SetBitmapBits and SetDIBits, but they're all in C, which I really don't understand very well. What I really need is some advice on what is the right approach to take and perhaps a Fortran example. Can anybody help?&lt;/P&gt;&lt;P&gt;With many thanks in advance,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2008 06:59:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-create-a-bitmap-from-pixel-data/m-p/876609#M74069</guid>
      <dc:creator>michael_green</dc:creator>
      <dc:date>2008-10-01T06:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a bitmap from pixel data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-create-a-bitmap-from-pixel-data/m-p/876610#M74070</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/10550"&gt;michaelgreen&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;This doesn't seem to be a case for using a memory device context and drawing to that. ...&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I have not translated image data to BMP from another format, but I think the Windows mechanism for this requires you to create a memory DC, then create a bitmap within that DC (in the same size as your original image), and then use the SETPIXEL function in a loop to translate your data one point at a time.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2008 21:56:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-create-a-bitmap-from-pixel-data/m-p/876610#M74070</guid>
      <dc:creator>Paul_Curtis</dc:creator>
      <dc:date>2008-10-01T21:56:28Z</dc:date>
    </item>
  </channel>
</rss>

