![]() ![]() ![]() I guess the reason imagefill() works with alpha blending on is because it does not perform any alpha blending - it always works without alpha blending regardless of the setting. So in order to use imagefilledrectangle() to erase an image to transparency, you need to turn off alpha blending first. So, drawing the rectangle in this case results in the original content of the image being completely replaced with a transparent rectangle. With blending off, when drawing to the image what you draw completely replaces what is already there. Therefore, because blending is on, and because the rectangle's fill colour is completely transparent, the blending of the existing image content with the transparent rectangle results in no change to the existing image. Alpha blending causes what you draw on the image to be blended with whatever is already on the image according to the alpha channels of each. The issue with filling using a rectangle is caused in your code by having alpha blending turned on before rendering the filled rectangle. If you need more performance, the step can be increased $inc_blue = ( $dest_blue - $src_blue )/ $width $inc_green = ( $dest_green - $src_green )/ $width $inc_red = ( $dest_red - $src_red )/ $width $inc_alpha = ( $dest_alpha - $src_alpha ) / $width I've made a function to make full color gradients: Here's the log on _lv_img_cache_open ->Image draw cannot open the image resource lv_draw_img ->Image draw error _lv_img_cache_open ->Image draw cannot open the image resource lv_draw_img ->Image draw error _lv_img_cache_open ->Image draw cannot open the image resource lv_draw_img ->Image draw error _lv_img_cache_open ->Image draw cannot open the image resource lv_draw_img ->Image draw errorĪnd here's the pastebin link for the log on LV_LOG_LEVEL_INFO.Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting User Submitted Data Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation GUI Extensions Keyboard Shortcuts ? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search I can't figure out the problem from the logs so I just post them here. The lv_png_init() is inside the display_init() function.ĭo you see anything suspicious if you enable logging in lv_conf.h? I also Enabled the log module on LV_LOG_LEVEL_WARN level and the following lines are printed in the _lv_img_cache_open ->Image draw cannot open the image resource lv_draw_img ->Image draw errorĪlso the same code works in vs simulator and the problem only occurs when I’m using esp32. the problem is only with png files because when i use a true color image it works fine. I tried to Use PNG images from flash and file as instructed in the README file of the library and none of them works. it only shows a white rectangle with a “No data” text on the top left corner. When I try to show a png image it doesn’t work. I'm using esp32(arduino framework) + lvgl + lv_lib_lodepng. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |