wctltya Posted October 13, 2016 Report Share Posted October 13, 2016 Hi, Attached is the uGFX Studio 0.15 project containing a single page with several small GIF images used as icons. The zip file includes 9 GIF images. I don't know what could be wrong with 7 of them, but only two are displayed ("service_output.gif" and "service_controlregulation.gif"). I won't worried if they are missing on the studio preview screen only, but they are not displayed on my application too. In that app I've implemented another background, so white squires are displayed instead of those 'wrong' images. A bit more info about images: The original files are in SVG format. So, I've converted them in GIF using GIMP and when I saw the most of them are not displayed, I've used another (an online) converter, but they behaves in the same way. All GIF images are displayed on the PC screen (windows) without complains. I'll appreciate if someone could help me to fix that. bifrost_service.zip Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted October 13, 2016 Report Share Posted October 13, 2016 Most likely the fault is caused by the GFILE_MAX_GFILES setting in the configuration file which is too low. Can you please try increasing that value and retry? The µGFX-Studio is supposed to calculate the correct number required, however, there might be a bug. In case of you need to access files that the µGFX-Studio doesn't know, you can add those in the GFILE tab in the Project Settings. Link to comment Share on other sites More sharing options...
wctltya Posted October 13, 2016 Author Report Share Posted October 13, 2016 Hi Joel, Increasing the GFILE_MAX_GFILES was the first I've done in my app. So now it is 100, although I need about 40. I'm using ROMFS and all images .h files are included in romfs_files.h Struggling whit that issue I've done some other tests: - Replaced one of the Imagebox with an image button and the result is the same - no image. - Generated image_file.h using file2c.exe and compared to the corresponding .h file generated by studio and they are equal. - Replaced all "wrong" images with one of those "good" images and they all are displayed. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted October 13, 2016 Report Share Posted October 13, 2016 Did you ensure that you actually have enough memory left to open that many images at once? You might want to check the return value of gdispImageOpenFile() (or equivalent of the Imagebox). The value returned is of the type gdispImageError, it will tell you what caused the failure. The possible values are documented in /src/gdisp/gdisp_image.h. The same applies to gdispImageDraw() (or equivalent of the Imagebox). 10 minutes ago, wctltya said: - Replaced all "wrong" images with one of those "good" images and they all are displayed. Just to ensure that I understand this the right way: You are able to display all images - just not at the same time? Link to comment Share on other sites More sharing options...
wctltya Posted October 13, 2016 Author Report Share Posted October 13, 2016 2 minutes ago, Joel Bodenmann said: 12 minutes ago, wctltya said: - Replaced all "wrong" images with one of those "good" images and they all are displayed. Just to ensure that I understand this the right way: You are able to display all images - just not at the same time? No, I'm able to display 5 images at the same time if they are "good", i.e. one of both below. 1 hour ago, wctltya said: ("service_output.gif" and "service_controlregulation.gif") In fact I'm able to display 6 images on that page including the menu button. I'm curious Joel, if you run my Studio project on your computer - do you see all images or the preview screen? 6 minutes ago, Joel Bodenmann said: Did you ensure that you actually have enough memory left to open that many images at once? Yes, I'm sure I have enough memory. Right now the project is run on Kinetis MK64F1M0VLL12, which has 1MB flash and 256KB SRAM. But although I've enough resources, I can create a page when I need it and destroy it when I don't. 10 minutes ago, Joel Bodenmann said: You might want to check the return value of gdispImageOpenFile() (or equivalent of the Imagebox). That is not so easy, but finally I'll do it. Link to comment Share on other sites More sharing options...
wctltya Posted October 14, 2016 Author Report Share Posted October 14, 2016 Hi Joel, The gdispImageOpenFile() returns GDISP_IMAGE_ERR_UNSUPPORTED. I really don't know what is wrong with those 7 'bad' images, because they are displayed on the PC screen in many image view/processing software's without complains, and even in uGFX studio design view. Seems that the uGFX gif decoder couldn't process them. Anyway, I've used another way to convert images in proper (for uGFX) gif format and finally all of them are displayed now. Attached is one of the images in 'good' format. It's 'bad' version is the zip file attached before, so if you are curious you can have a look and try to find out the reason. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted October 17, 2016 Report Share Posted October 17, 2016 On 10/13/2016 at 11:55, wctltya said: I'm curious Joel, if you run my Studio project on your computer - do you see all images or the preview screen? We didn't find the time to test it yet, sorry. These kinds of symptoms often arise from common errors such as not enabling the image format in the configuration file or having GFILE_MAX_FILES set to a number too small. As these things usually cover 95% of the problems we tend to let the user check those before we spend the time setting everything up on our side. The new µGFX-Studio will have a proper "export as ZIP-Archive" feature which will vastly speed up things like this. On 10/13/2016 at 11:55, wctltya said: On 10/13/2016 at 11:36, Joel Bodenmann said: You might want to check the return value of gdispImageOpenFile() (or equivalent of the Imagebox). That is not so easy, but finally I'll do it. That should be a thing very easy to do. Just store the return value in a variable of type gdispImageError and read out that value (either display it, send it over serial or look at it via the debugger, ...) On 10/14/2016 at 15:03, wctltya said: The gdispImageOpenFile() returns GDISP_IMAGE_ERR_UNSUPPORTED. I really don't know what is wrong with those 7 'bad' images, because they are displayed on the PC screen in many image view/processing software's without complains, and even in uGFX studio design view. Seems that the uGFX gif decoder couldn't process them. I'm glad to hear that you found the problem. We will have a look at your images to determine the problem, but that will take some time. There are certain features that the µGFX image decoders don't support such as PNG interlacing as that would simply bloat code-size with little to no gain at all. However, the GIF decoder should be pretty complete. So far we never encountered an image that imposed problems. The reason why the µGFX-Studio displays the image is because it doesn't use our image decoders. That is probably the biggest benefit of the new µGFX-Studio: It actually uses the real µGFX library to render everything. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now