<?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 BMP2c.exe in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128418#M287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;Hi all,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;&amp;nbsp;Does anyone know from where shall i&amp;nbsp; download the BMP2C v1.1 exe.It is a freeware from freescale only.I need that same exe to convert a bmp image to .c file.Any help is appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;&amp;nbsp;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Serene&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2007 11:30:07 GMT</pubDate>
    <dc:creator>serene</dc:creator>
    <dc:date>2007-03-28T11:30:07Z</dc:date>
    <item>
      <title>BMP2c.exe</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128418#M287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;Hi all,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;&amp;nbsp;Does anyone know from where shall i&amp;nbsp; download the BMP2C v1.1 exe.It is a freeware from freescale only.I need that same exe to convert a bmp image to .c file.Any help is appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;&amp;nbsp;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #009900; font-family: Garamond; font-size: 4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Serene&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 11:30:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128418#M287</guid>
      <dc:creator>serene</dc:creator>
      <dc:date>2007-03-28T11:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: BMP2c.exe</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128419#M288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just checked on FSL web page.&lt;/DIV&gt;&lt;DIV&gt;This utility is referenced from application note AN3415.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you load the accompanying software (AN3415SW)&amp;nbsp; BMP2C is part of the zip file.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope this helps.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 16:52:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128419#M288</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-03-28T16:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: BMP2c.exe</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128420#M289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#336600" face="Garamond" size="4"&gt;Hi,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#336600" face="Garamond" size="4"&gt;&amp;nbsp;Thanks for the reply..&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#336600" face="Garamond" size="4"&gt;&amp;nbsp;But I need the exact version BMP2C V1.1 .&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#336600" face="Garamond" size="4"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#336600" face="Garamond" size="4"&gt;The output file will look like ...&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;const &lt;FONT color="#000000" size="2"&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;int&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;bitmap_width = 240;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;const &lt;FONT color="#000000" size="2"&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;int&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;bitmap_height = 80;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;Comments&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;utput bpp: 16,Output format: RGB565&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;Code:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;const &lt;FONT color="#000000" size="2"&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;unsigned&lt;/FONT&gt; &lt;FONT color="#000000" size="2"&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;short&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;bitmap_data[19200] = {&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;0xFFFF,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;0xFFFF,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;0xFFFF,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;....&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;....etc..&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&amp;nbsp;But now output is &lt;FONT color="#0000ff" size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;const &lt;FONT color="#000000" size="2"&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;char&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;Image[] = {&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;800, 600,&amp;nbsp;&amp;nbsp;&amp;nbsp; comment:&lt;FONT color="#008000" size="2"&gt;Imagesize width x height (in pixel)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;..etc..&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;This tool is used in freescale's IMX31 bsp's display driver .I need that same tool...Or Shall i change my output file to that format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Serene&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2007 14:56:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128420#M289</guid>
      <dc:creator>serene</dc:creator>
      <dc:date>2007-03-29T14:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: BMP2c.exe</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128421#M290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Could the reason for the different pixel size not be the bmp file you are encoding?&lt;BR /&gt;According to MS Paint, bmp's exist at least with 1, 8, 32 bits per pixel.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;BTW:&lt;BR /&gt;"const char Image[] = { 800, 600," looks a bit odd. Should probably be unsigned char , that's a minor thing, but more important, 800 and 600 do not fit into any char....&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Mar 2007 02:55:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128421#M290</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-03-31T02:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: BMP2c.exe</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128422#M291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;CompilerGuru wrote:&lt;BR /&gt;BTW: "const char Image[] = { 800, 600," looks a bit odd.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;I would bet that it is meant to be:&lt;BR /&gt;&lt;BR /&gt;const char Image[800][600];&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Mar 2007 04:22:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128422#M291</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2007-03-31T04:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: BMP2c.exe</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128423#M292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; I got the solution for the problem.I have written a program which converts 24 bit bmp data to RGB 565 format.24 bit bmp contains data in the format (RGB-8 bits for representing each color).RGB 565 format contains first 5 bits of RED, first 6 bits of GREEN, first 5 bits of BLUE.So we need to get the desired information out of these 24 bits.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Will explain the steps...&lt;/DIV&gt;&lt;DIV&gt;1.Open the 24 bit bmp file in text pad or any hex editor...&lt;/DIV&gt;&lt;DIV&gt;2.Remove the bmp header&lt;/DIV&gt;&lt;DIV&gt;3.Copy the pixel information to an array of the following format&lt;/DIV&gt;&lt;DIV&gt;4.Use the below code&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;unsigned char MyBMPData[ ] ={, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff etc.......}; #include&amp;lt;stdio.h&amp;gt;#include&amp;lt;stdlib.h&amp;gt;typedef unsigned short WORD;#define RGB_TO_565(r, g, b) (WORD) ((r &amp;amp; 0xf8 )&amp;lt;&amp;lt;8) | ((g&amp;amp;0xfc)&amp;lt;&amp;lt;3) | ((b&amp;amp;0xf8)&amp;gt;&amp;gt;3)void main(){ FILE *fp; int length = sizeof(MyBMPData)/sizeof(unsigned char ); printf("\n%d\n", length); int logoLength= length/3; printf("\nx =%d\n", logoLength); unsigned short *logo; logo = (unsigned short*)malloc(logoLength*sizeof(unsigned short)); char logoBuffer[25]; fp = fopen("C://MyLogo.c","w"); // opens a file to store RGB 565 format data outpurt sprintf(logoBuffer,"MyLogo[%d] =\n { \n",logoLength); printf("%s",logoBuffer);  fprintf(fp,"%s",logoBuffer); for(int index = 0,logoIndex =0;  (index&amp;lt;length &amp;amp;&amp;amp; logoIndex&amp;lt;logoLength);logoIndex++) {  logo[logoIndex] = RGB_TO_565(MyBMPData[index],MyBMPData[index+1],MyBMPData[index+2]);  index = index+3;  printf("0x%x, ", logo[logoIndex]);  fprintf(fp,"0x%x, ", logo[logoIndex]);  if((logoIndex+1)%20 ==0)  {   printf("\n");   fprintf(fp,"\n");  }   } printf("};"); fprintf(fp,"};"); fclose(fp);} /*********the output file would look like this****************/ MyLogo[19200] = {0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, \
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, \
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, \
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, \
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, \
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, \
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff etc...};&lt;/PRE&gt;&lt;/DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;Serene&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Alban formatted code to avoid smileys.&lt;BR /&gt;&lt;/DIV&gt;&lt;SPAN class="time_text"&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-06-25&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;11:34 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 15:50:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/BMP2c-exe/m-p/128423#M292</guid>
      <dc:creator>serene</dc:creator>
      <dc:date>2007-06-25T15:50:18Z</dc:date>
    </item>
  </channel>
</rss>

