<?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>LPC MicrocontrollersのトピックHow to draw bitmap LPCXpresso54608</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824052#M32962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well this is an old question of course, I have read a bitmap from sd, but using a big bitmap(480x272 in my case) my ram gets stock, I know that there is a way drawing an image with&amp;nbsp;GUI_BMP_DrawEx() as user and reference manual says, it do not have to be read into the memory but it use a variable as buffer. The problem is the same. Some examples of emWin use window library and&amp;nbsp;I cannot found it. I have check some questions made before and I have downloaded some examples of them. I´m using MCUXpresso IDE, I would like to share my way to read an image from sd, I was wondering if someone has an example without using window library or telling me how to include it in my project. I would like to draw BMP, JPG, PNG and GIF image I have read reference manual UM03001.pdf but I´m stock in How to read file without &amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;GUI_BMP_Draw&lt;/SPAN&gt;() function. I mean; I have modified some examples in old question like this one, these are my functions:&lt;/P&gt;&lt;P&gt;static void _ShowBMP(const TCHAR* sFilename)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int XSize, YSize, XPos, YPos;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FIL&amp;nbsp;&amp;nbsp;&amp;nbsp; hFile;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FRESULT error;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error = f_open(&amp;amp;hFile, sFilename, (FA_READ | FA_OPEN_EXISTING));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (error == FR_OK)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GUI_ClearRect(0, 0, 480, 272);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XSize = GUI_BMP_GetXSizeEx(_GetData, &amp;amp;hFile);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;YSize = GUI_BMP_GetYSizeEx(_GetData, &amp;amp;hFile);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XPos = (XSize &amp;gt; 480) ?&amp;nbsp; 0 : 160 - (XSize / 2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;YPos = (YSize &amp;gt; 272) ? 60 : 150 - (YSize / 2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (!GUI_BMP_DrawEx(_GetData, &amp;amp;hFile, XPos, YPos))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GUI_Delay(2000);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f_close(&amp;amp;hFile);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my getdata function&lt;/P&gt;&lt;DIV&gt;static int _GetData(void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;static char _acBuffer[0x200];&lt;BR /&gt;&amp;nbsp;unsigned int NumBytesRead;&lt;BR /&gt;&amp;nbsp;FIL * phFile;&lt;BR /&gt;&amp;nbsp;phFile = (FIL *)p;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Check buffer size&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;if (NumBytesReq &amp;gt; sizeof(_acBuffer))&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;NumBytesReq = sizeof(_acBuffer);&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Set file pointer to the offset location&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;f_lseek(phFile, 0U);&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Read data into buffer&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;f_read(phFile, _acBuffer, sizeof(_acBuffer), &amp;amp;NumBytesRead);&lt;BR /&gt;//&amp;nbsp;NumBytesRead = FS_FRead(_acBuffer, sizeof(char), NumBytesReq, phFile);&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Set data pointer to the beginning of the buffer&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;*ppData = _acBuffer; &amp;nbsp; &amp;lt;----------------------------------THIS IS THE BUFFER&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Return number of available bytes&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;return NumBytesRead;&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;It is important to say that open function returns a FR_OK parameter that indicates that file has been loaded, but when draw bitmap function is called there is not image showed.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Finally, these files are the way that I use to show bitmap image from sd but it has the problema when I read big images(my RAM ends).&lt;/DIV&gt;&lt;DIV&gt;If somebody could help me I will apreciate it so much. I think this is the same way to draw gif, jpg and png images&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2018 22:51:15 GMT</pubDate>
    <dc:creator>oscarniño</dc:creator>
    <dc:date>2018-10-03T22:51:15Z</dc:date>
    <item>
      <title>How to draw bitmap LPCXpresso54608</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824052#M32962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well this is an old question of course, I have read a bitmap from sd, but using a big bitmap(480x272 in my case) my ram gets stock, I know that there is a way drawing an image with&amp;nbsp;GUI_BMP_DrawEx() as user and reference manual says, it do not have to be read into the memory but it use a variable as buffer. The problem is the same. Some examples of emWin use window library and&amp;nbsp;I cannot found it. I have check some questions made before and I have downloaded some examples of them. I´m using MCUXpresso IDE, I would like to share my way to read an image from sd, I was wondering if someone has an example without using window library or telling me how to include it in my project. I would like to draw BMP, JPG, PNG and GIF image I have read reference manual UM03001.pdf but I´m stock in How to read file without &amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;GUI_BMP_Draw&lt;/SPAN&gt;() function. I mean; I have modified some examples in old question like this one, these are my functions:&lt;/P&gt;&lt;P&gt;static void _ShowBMP(const TCHAR* sFilename)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int XSize, YSize, XPos, YPos;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FIL&amp;nbsp;&amp;nbsp;&amp;nbsp; hFile;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FRESULT error;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error = f_open(&amp;amp;hFile, sFilename, (FA_READ | FA_OPEN_EXISTING));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (error == FR_OK)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GUI_ClearRect(0, 0, 480, 272);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XSize = GUI_BMP_GetXSizeEx(_GetData, &amp;amp;hFile);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;YSize = GUI_BMP_GetYSizeEx(_GetData, &amp;amp;hFile);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XPos = (XSize &amp;gt; 480) ?&amp;nbsp; 0 : 160 - (XSize / 2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;YPos = (YSize &amp;gt; 272) ? 60 : 150 - (YSize / 2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (!GUI_BMP_DrawEx(_GetData, &amp;amp;hFile, XPos, YPos))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GUI_Delay(2000);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f_close(&amp;amp;hFile);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my getdata function&lt;/P&gt;&lt;DIV&gt;static int _GetData(void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;static char _acBuffer[0x200];&lt;BR /&gt;&amp;nbsp;unsigned int NumBytesRead;&lt;BR /&gt;&amp;nbsp;FIL * phFile;&lt;BR /&gt;&amp;nbsp;phFile = (FIL *)p;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Check buffer size&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;if (NumBytesReq &amp;gt; sizeof(_acBuffer))&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;NumBytesReq = sizeof(_acBuffer);&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Set file pointer to the offset location&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;f_lseek(phFile, 0U);&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Read data into buffer&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;f_read(phFile, _acBuffer, sizeof(_acBuffer), &amp;amp;NumBytesRead);&lt;BR /&gt;//&amp;nbsp;NumBytesRead = FS_FRead(_acBuffer, sizeof(char), NumBytesReq, phFile);&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Set data pointer to the beginning of the buffer&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;*ppData = _acBuffer; &amp;nbsp; &amp;lt;----------------------------------THIS IS THE BUFFER&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;// Return number of available bytes&lt;BR /&gt;&amp;nbsp;//&lt;BR /&gt;&amp;nbsp;return NumBytesRead;&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;It is important to say that open function returns a FR_OK parameter that indicates that file has been loaded, but when draw bitmap function is called there is not image showed.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Finally, these files are the way that I use to show bitmap image from sd but it has the problema when I read big images(my RAM ends).&lt;/DIV&gt;&lt;DIV&gt;If somebody could help me I will apreciate it so much. I think this is the same way to draw gif, jpg and png images&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2018 22:51:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824052#M32962</guid>
      <dc:creator>oscarniño</dc:creator>
      <dc:date>2018-10-03T22:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to draw bitmap LPCXpresso54608</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824053#M32963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar Nino,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do you have tried the small bin picture, whether it works OK on your side? Just make sure your problem is the RAM problem or the emwin using problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You mentioned :window library , could you give me more information about it, where you find these library information. Is it from NXP or Segger emwin?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; About the emwin problem, I think you also can post the question in segger, because it is the segger's product, their engineer will be more familiar with it. The link is:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.segger.com/support/technical-support/" title="https://www.segger.com/support/technical-support/"&gt;Technical Support | SEGGER - The Embedded Experts&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; About the RAM size problem, I think you can consider to add an external SRAM which can connected to the EMC module, just like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74300i71B85EB1F63BB512/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then the external RAM will have the according address in the LPC54608, you can call that memory directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 06:08:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824053#M32963</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-10-11T06:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to draw bitmap LPCXpresso54608</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824054#M32964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Hi Kerry Zhou&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Thanks for reply, about BIN picture I haven´t , I have tried small picture using GUI_BMP_Draw() function. About problema I think it is both, SDRAM I can´t use it, I have seen and debug examples of this but when I implement it in my code it doesn´t work.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;This is how I use SDRAM:&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;First way.-&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;void *g_bufferRead = (void *)SDRAM_BASE_ADDR; /*SDRAM starting address*/&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;then:&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;sizeImage = g_fileObject.obj.objsize - g_fileObject.fptr;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;g_bufferRead = malloc(sizeImage);&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;to reserve memory&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;and finally&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;error = f_read(&amp;amp;g_fileObject, g_bufferRead, sizeof(sizeImage), &amp;amp;bytesRead);&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Second way.-&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;uint8_t (*g_bufferRead)[0x80000] = (uint8_t(*)[0x80000])SDRAM_BASE_ADDR; /*SDRAM starting address*/&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;then:&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;sizeImage = g_fileObject.obj.objsize - g_fileObject.fptr;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;error = f_read(&amp;amp;g_fileObject, g_bufferRead, sizeof(sizeImage), &amp;amp;bytesRead);&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Third way.-&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;UINT *g_bufferRead[g_fileObject.obj.objsize - g_fileObject.fptr] = (UINT*)SDRAM_BASE_ADDR[g_fileObject.obj.objsize - g_fileObject.fptr];&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;error = f_read(&amp;amp;g_fileObject, g_bufferRead, (g_fileObject.obj.objsize - g_fileObject.fptr), &amp;amp;bytesRead);&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;but any of them work&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;About Windows library, I have check some examples from emwin: "2DGL_DrawBMP.c" in this example appears windows library (I attached this file)&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Finally aboud SRAM or SDRAM Im using LPCXpresso54608 board, I suppose it has SDRAM because&amp;nbsp; examples&amp;nbsp;lcd_accel_tft16bpp and&amp;nbsp;emc_sdram use it.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;I attach some examples uploaded by someone else here(DRAW_BMP_JPG_PNG_0.c).&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;To correspond to my request I would like to share an emwin project that works on the LPCXpresso54608 board Space Evader, you just have to créate an emwin example project in MCUXpreso and copy this files into rar file over source folder in the mentioned example.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Could any body help me?&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;I would like to see an example of doing this with GUI_BMP_DrawEx() function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 18:30:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824054#M32964</guid>
      <dc:creator>oscarniño</dc:creator>
      <dc:date>2018-10-11T18:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to draw bitmap LPCXpresso54608</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824055#M32965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar Nino,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thanks for your updated information!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please also provide the original BMP picture,I also need to check whether the data is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Then I will test it on my LPC54608 board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 08:18:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824055#M32965</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-10-12T08:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to draw bitmap LPCXpresso54608</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824056#M32966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry Zhou&lt;/P&gt;&lt;P&gt;Thanks for reply, I attached my MCUXpresso project and bitmap files.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 15:06:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824056#M32966</guid>
      <dc:creator>oscarniño</dc:creator>
      <dc:date>2018-10-12T15:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to draw bitmap LPCXpresso54608</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824057#M32967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I cannot resolved the problema about draw bitmap with &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;GUI_BMP_DrawEx() function, so I had to read about bitmap files and I resolved in this way, I would like to share this metod. If someone has a way to avoid the sweep image(showing pixel per pixel) I would apreciated it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;first:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.aprendeaprogramar.com/mod/resource/view.php?id=630" title="http://www.aprendeaprogramar.com/mod/resource/view.php?id=630"&gt;6.10 Ejemplo: leer información de un fichero BMP - AprendeAProgramar.com&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INFORMATION TYPE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BYTE POSITION&lt;/P&gt;&lt;P&gt;File Type (BM) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0-1 &lt;BR /&gt;File Size &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2-5 &lt;BR /&gt;Reserved &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 6-7 &lt;BR /&gt;Reserved &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8-9 &lt;BR /&gt;Offset (start image) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 10-13&lt;/P&gt;&lt;P&gt;Header Size &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 14-17 &lt;BR /&gt;Xsize(píxels) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;18-21 &lt;BR /&gt;Ysize(píxels) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;22-25 &lt;BR /&gt;Number of layers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 26-27 &lt;BR /&gt;Bits per pixel &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;28-29 &lt;BR /&gt;Compression &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;30-33 &lt;BR /&gt;Image Size &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;34-37 &lt;BR /&gt;Horizontal resolution&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 38-41 &lt;BR /&gt;Vertical resolution&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 42-45 &lt;BR /&gt;Table color size &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;46-49 &lt;BR /&gt;Importan colors counter &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;50-53&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So based on this:&lt;/P&gt;&lt;DIV&gt;FRESULT drawBitmap(const TCHAR* path, uint16_t posX, uint16_t posY)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;FRESULT error;&lt;BR /&gt;&amp;nbsp;FIL g_fileObject;&lt;BR /&gt;&amp;nbsp;uint32_t bytesRead;&lt;BR /&gt;&amp;nbsp;uint8_t bufHeader[HEADER_SIZE];&lt;BR /&gt;&amp;nbsp;bmpFile imageToDraw;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;error = f_open(&amp;amp;g_fileObject, path, (FA_READ | FA_OPEN_EXISTING));&lt;BR /&gt;&amp;nbsp;if (error != FR_OK)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;return error;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;error = f_lseek(&amp;amp;g_fileObject, 0U);&lt;BR /&gt;&amp;nbsp;if (error != FR_OK)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;return error;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;error = f_read(&amp;amp;g_fileObject, bufHeader, HEADER_SIZE, &amp;amp;bytesRead); //Read header&lt;BR /&gt;&amp;nbsp;if (error)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;return error;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;fillBmpInfo(&amp;amp;imageToDraw, bufHeader);&lt;BR /&gt;&amp;nbsp;drawBmpPerLine(&amp;amp;g_fileObject,&amp;amp;imageToDraw, 0, 0);&lt;BR /&gt;&amp;nbsp;error = f_close (&amp;amp;g_fileObject);&lt;BR /&gt;&amp;nbsp;if (error)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;return error;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;return FR_OK;&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;void fillBmpInfo(bmpFile *f, uint8_t *buf)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;f-&amp;gt;typeFile = (WORD)((buf[1] &amp;lt;&amp;lt; 8) + buf[0]);&lt;BR /&gt;&amp;nbsp;f-&amp;gt;bmpSize = (WORD)((buf[5] &amp;lt;&amp;lt; 24) + (buf[4] &amp;lt;&amp;lt; 16) + (buf[3] &amp;lt;&amp;lt; 8) + buf[2]);&lt;BR /&gt;&amp;nbsp;f-&amp;gt;offset = (WORD)((buf[13] &amp;lt;&amp;lt; 24) + (buf[12] &amp;lt;&amp;lt; 16) + (buf[11] &amp;lt;&amp;lt; 8) + buf[10]);&lt;BR /&gt;&amp;nbsp;f-&amp;gt;headerSize = (WORD)((buf[17] &amp;lt;&amp;lt; 24) + (buf[16] &amp;lt;&amp;lt; 16) + (buf[15] &amp;lt;&amp;lt; 8) + buf[14]);&lt;BR /&gt;&amp;nbsp;f-&amp;gt;xSize = (WORD)((buf[21] &amp;lt;&amp;lt; 24) + (buf[20] &amp;lt;&amp;lt; 16) + (buf[19] &amp;lt;&amp;lt; 8) + buf[18]);&lt;BR /&gt;&amp;nbsp;f-&amp;gt;ySize = (WORD)((buf[25] &amp;lt;&amp;lt; 24) + (buf[24] &amp;lt;&amp;lt; 16) + (buf[23] &amp;lt;&amp;lt; 8) + buf[22]);&lt;BR /&gt;&amp;nbsp;f-&amp;gt;bpp = (WORD)((buf[29] &amp;lt;&amp;lt; 8) + buf[28]);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;void drawBmpPerLine(FIL* fp,bmpFile *f, uint16_t posX, uint16_t posY)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;uint16_t bytesLineSize = f-&amp;gt;xSize*3;&lt;BR /&gt;&amp;nbsp;uint32_t remainBytes = f-&amp;gt;imageSize;&lt;BR /&gt;//&amp;nbsp;uint8_t bufferPerLine[bytesLineSize];&lt;BR /&gt;&amp;nbsp;uint8_t *bufferPerLine = (uint8_t *)SDRAM_BASE_ADDR;&lt;BR /&gt;&amp;nbsp;bufferPerLine = malloc(bytesLineSize);&lt;BR /&gt;&amp;nbsp;uint32_t RGBcolor;&lt;BR /&gt;&amp;nbsp;UINT bytesRead;&lt;BR /&gt;&amp;nbsp;uint32_t offSet = f-&amp;gt;offset;&lt;BR /&gt;&amp;nbsp;uint16_t Xindex;&lt;BR /&gt;&amp;nbsp;uint16_t Yindex;&lt;BR /&gt;&amp;nbsp;uint32_t bufIndex;&lt;BR /&gt;&amp;nbsp;uint8_t X = posX;&lt;BR /&gt;&amp;nbsp;uint8_t Y;&lt;BR /&gt;&amp;nbsp;uint16_t stepPixel = f-&amp;gt;bpp/8;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;for(Yindex = f-&amp;gt;ySize; Yindex &amp;gt;= 0; Yindex--)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;f_lseek(fp, offSet);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;f_read(fp, bufferPerLine, bytesLineSize, &amp;amp;bytesRead);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;bufIndex = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;for(Xindex = 0; Xindex &amp;lt; f-&amp;gt;xSize; Xindex++)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;RGBcolor = (WORD)((bufferPerLine[bufIndex+2] &amp;lt;&amp;lt; 16) + (bufferPerLine[bufIndex+1] &amp;lt;&amp;lt; 8) + bufferPerLine[bufIndex]);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;GUI_SetColor(RGBcolor);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;GUI_DrawPixel(posX+Xindex, posY+Yindex);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;bufIndex += stepPixel;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;offSet += bytesLineSize;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I hope this could be helpfully for someone.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Beast regards&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 18:45:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-draw-bitmap-LPCXpresso54608/m-p/824057#M32967</guid>
      <dc:creator>oscarniño</dc:creator>
      <dc:date>2018-10-22T18:45:50Z</dc:date>
    </item>
  </channel>
</rss>

