<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50727/display-image-sent-over-bluetooth</link><description>Hi, 
 I want to display an image sent over Bluetooth on my screen which uses the driver st7735. So I have an application which can send images, and I receive data in the function nus_data_handler. With this application, I send array of 20 data (two first</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Sep 2019 06:50:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50727/display-image-sent-over-bluetooth" /><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/208101?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 06:50:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:021b35a3-2a5f-45ed-bf4a-f245dd1e8fdf</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What format do you save the file as in Photoshop?&lt;/p&gt;
&lt;p&gt;Most likely the problem is with the conversion from an image to a C file. Are you using the program recommended by lydie below?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207986?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2019 13:16:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a820b232-169f-49c1-9fa0-02ae83defe7f</guid><dc:creator>yuval</dc:creator><description>&lt;p&gt;thanks. a quick question. i want to save an image i create using Photoshop. but when i convert it and import it , the image is distorted and all i get on the LCD is unreadable. do you know what it the process from Photoshop all the way to the LCD (c file)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207792?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2019 07:04:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:435bb4f1-5b26-4686-ab72-fddd9b244e5e</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi guys&lt;/p&gt;
&lt;p&gt;I made an optimized driver a while back for the Adafruit capacitive touch display, which should also be based on the ILI9341 driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I replaced many of the single pixel updates with buffer updates to speed up the display operations.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The modified drivers can be found in the adafruit_touch_display folder in this repo:&lt;br /&gt;&lt;a href="https://github.com/NordicPlayground/nrf52-ble-multi-link-multi-role/tree/feature_tripple_phy_peripheral"&gt;https://github.com/NordicPlayground/nrf52-ble-multi-link-multi-role/tree/feature_tripple_phy_peripheral&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Feel free to try it out,&amp;nbsp;hopefully it will improve performance also in your application &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207603?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 09:01:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e99b3b11-8ef9-40cf-86d4-66b0730d129a</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;I have the same problem with the text. So when I want to display an image, I rotate the screen of 180, I display my image, and I rotate of 180 to return to the original position.&lt;/p&gt;
&lt;p&gt;For the colors, my problem was with&amp;nbsp;nrf_gfx_bmp565_draw. I changed this function by replacing the 2 loops for with:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; uint32_t cpt=0;

    for (int32_t i = 0; i &amp;lt; p_rect-&amp;gt;height; i++)
    {
        for (uint32_t j = 0; j &amp;lt; p_rect-&amp;gt;width; j++)
        {
            cpt++;
            idx = (uint32_t) (p_rect-&amp;gt;height)*(p_rect-&amp;gt;width)-cpt;
            pixel = img_buf[idx];
            pixel_draw(p_instance, p_rect-&amp;gt;x + j, p_rect-&amp;gt;y + i, pixel);
            
        }
    }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207599?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 08:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe118884-4ec5-426d-902a-e5b875779769</guid><dc:creator>yuval</dc:creator><description>&lt;p&gt;the driver is ili9341, which is the same. when i modify the driver to display the image correct then&amp;nbsp;now the text is reversed. wired. about the color - they are different , perhaps the driver is not config to 565&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207575?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 08:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a3ef45c-f9f0-4327-b710-e38479768ed1</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;It&amp;#39;s also very slow for me, like 2 seconds to display an image, I don&amp;#39;t know why, maybe it&amp;#39;s because it displays pixel by pixel.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What is your driver? Because to remove the mirror effect, I&amp;nbsp;modified some things in st7735.c.&lt;/p&gt;
&lt;p&gt;Why your colors are incorrect? Colors are&amp;nbsp;the opposite?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207537?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 06:32:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41be1dae-90b7-476b-9f26-1568c2b966ee</guid><dc:creator>yuval</dc:creator><description>&lt;p&gt;thank you . it works. but 2 problems. its very slow , the image takes a few seconds to fully display.any idea how to make it faster?&lt;/p&gt;
&lt;p&gt;the second , the image is displayed mirror and reverse. its like the image matrix&amp;nbsp;values is reversed.is it because of the application? also the colors are incorrect&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207426?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 13:33:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61f3c008-1b01-4027-94bc-90d5ba2a7e37</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should be able to check the data stored&amp;nbsp;in the image_received by starting a debug session in SES, right clicking the &lt;em&gt;image_received&lt;/em&gt; variable, and select &lt;em&gt;Locate Memory&lt;/em&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To see the whole buffer you might need to change the &lt;em&gt;Size&lt;/em&gt; parameter in the memory window.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you can put a breakpoint in the code at the point where you are about to use the data in &lt;em&gt;image_received&lt;/em&gt;, and check if the data looks OK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207273?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 05:58:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f90c5d0-edec-4a85-821f-bc94cebad36f</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;I use ImageConverter565.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can download it here:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://github.com/mysensors/MySensorsArduinoExamples/blob/master/libraries/UTFT/Tools/ImageConverter565.exe"&gt;https://github.com/mysensors/MySensorsArduinoExamples/blob/master/libraries/UTFT/Tools/ImageConverter565.exe&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It generates a .c file&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207271?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 05:51:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b77bc9f-d88a-4427-96e4-b4eda3b44453</guid><dc:creator>yuval</dc:creator><description>&lt;p&gt;i have a bmp image (320 x 240) and i want to transform it to C matrix array of 16bit&amp;nbsp;&lt;span&gt;(320 x 240).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;how did you do that?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207267?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 01:23:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b47ca11-f73a-45b2-9c47-3761c1cae654</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;Hi, sorry for my late answer and thanks for your reply.&lt;/p&gt;
&lt;p&gt;Yes, I try to display image_received, but this array is changed when I receive data.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how can I check what is stored in image_received with the debugger. Do you have an idea?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207266?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 01:18:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a6f8430-e698-4731-a5ab-87076dada7c5</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;I still can&amp;#39;t display an image sent over Bluetooth, but I can display an image shared in a RAM like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gfx_rect_t rect_step = NRF_GFX_RECT(26, 30,80 , 130);//nrf_gfx_width_get(p_lcd)
APP_ERROR_CHECK(nrf_gfx_rect_draw(p_lcd, &amp;amp;rect_step, 2, BLACK, false));
APP_ERROR_CHECK(nrf_gfx_bmp565_draw(p_lcd, &amp;amp;rect_step, step_img));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The image I want to display is step_img and its format is:&lt;pre class="ui-code" data-mode="c_cpp"&gt;static const uint16_t step_img[]={
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x0010 (16)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFDE, 0x6308,   // 0x0020 (32)
0x0000, 0x6310, 0xFFDE, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x0030 (48)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x0040 (64)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x0050 (80)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x0060 (96)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF, 0x0000, 0x0000,   // 0x0070 (112)
0x0000, 0x0000, 0x2108, 0xFFFF,[...] }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/207251?ContentTypeID=1</link><pubDate>Sun, 01 Sep 2019 10:27:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b32666e9-0258-466b-9e64-bfb3dc0d70b3</guid><dc:creator>yuval</dc:creator><description>&lt;p&gt;&lt;span class="user-name"&gt;hi Iydie&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;can you share the code or explain how you used the&amp;nbsp;nrf_gfx_bmp565_draw function. im trying to display an image on my LCD with than function without any success.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: display image sent over Bluetooth</title><link>https://devzone.nordicsemi.com/thread/202872?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 14:18:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0afc5c4e-af5c-4cb7-80fc-ea75a494e7f5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I understand you correctly only the original 0xFFFF (white) data is displayed?&lt;/p&gt;
&lt;p&gt;Have you used the debugger to check what is stored in the image_received buffer before the nrf_gfx_background_set command is run?&lt;/p&gt;
&lt;p&gt;How do you declare the image_received buffer?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On a side note I would consider rewriting the loop function like this for clarity and efficiency:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;for(int i = 2; i &amp;lt; &amp;#39;length&amp;#39;; i += 4)
{
    red = array_data[i];
    green = array_data[i + 1];
    blue = array_data[i + 2];
    
    // Do processing
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>