cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Gauge background image not displaying correctly in TouchGFX Designer 4.16

Simon Sq
Associate III

Hi,

I've just upgraded to version 4.16 of TouchGFX and noticed an issue with the new gauge widget.

When I use a custom background image it does not get displayed correctly inside the application. It's displayed somewhat "zoomed in". I've attached a screen shot showing the issue.

  

My background image is 112x112, and the widget is 112x112, however as you can see from the screenshot the image does not fit within the bounds of the widget.

It's worth noting that the image does render correctly on the actual target hardware (I haven't tried the simulator).

Is this a bug? Or have I missed one of the settings?

Thanks,

Simon

9 REPLIES 9
Alexandre RENOUX
Principal

Hello Simon Sq,

It's quite interesting. Thank you for reporting it. However on my side I don't reproduce it.

Could you enclose the image so that I can try with your image and see if it happens ?

/Alexandre

Simon Sq
Associate III

HI Alexandre,

Interesting you aren't able to re-produce it. I've attached a similar image to the one I was using, it also has the same issue.

More interestingly if I resize one of the default images that come with touchgfx skins (see attached gauge_112.png) it seems to display correctly in the designer.

So although both files are 112x112 px they display differently when used with the gauge. I can't quite understand what the issue may be.

AS a side note, using either images within an Image widget both images appear correctly in the designer.

Kind Regards,

Simon

Simon Sq
Associate III

Seems I could only attach a single image to the previous post. Attached is the image which exhibits the issue I described in the OP.

Alexandre RENOUX
Principal

Hello Simon Sq,

I managed to reproduce your issue with the full circle image you provided. I'm currently investigating.

Could you tell me how you got this picture ? This might help us understand why it behaves like this. We need to find the root cause before I can tell the dev team to make a fix 😉

/Alexandre

Alexandre RENOUX
Principal

I believe your picture is somewhat corrupted with wrong data inside.

I managed to have a good behavior with an image based on the one you sent and with 112x112 pixel in size

Here are the steps I did :

  • Open Paint.NET (it's not Paint it's a different software)
  • Create a new canvas 112x112px
  • delete the white background to have transparent background
  • Add the picture you sent. A pop up window appears : select "add a layer'
  • Now save the picture as png
  • Include this image in your TouchGFX project and it works

You will find enclosed the modified image.

/Alexandre

Hi Alexandre,

Thanks for this information - I have tried it and it does resolve the problem. My original image was generated using Adobe Illustrator CS6 and was exported at 72dpi.

I think I may have found the root cause of the issue. I tried a similar thing to you in that I did the following:

  1. Opened one of the skin gauge images that ships with touchgfx in Photoshop
  2. Deleted its contents to have only a transparent background
  3. Resized to fit my image
  4. Pasted the contents of my original file into a new layer
  5. Save file

And viola it worked. But, what I then discovered was when resizing the image (step 3) I noticed Photoshop indicated the image was at 96dpi, where as my original image from Illustrator was reported as 72dpi.

Now I don't know what this would make a difference, dpi has no real meaning in the context of touchgfx, but it does seems to make a difference. Perhaps there is something in the touchgfx designer code that assumes the images are at 96dpi? I still find it strange that all images appear correctly in the Image widget, but not the gauge - which I understand uses an Image widget to display the background.

So I don't think my image is corrupted, but it seems the dpi of the image when created causes a problem in the designer.

I've attached a zip file containing two more images and you will see the problem. One image is 96dpi, the other is 72dpi - but both images are the same size - 128x128 pixels. Images were created using Photoshop CS6.

Paint.NET also allows you to alter the dpi of the image - it's called "resolution" when creating an image.

Kind Regards,

Simon

Hi Simon Bq,

Thank you very much for your feedback. Indeed with your test images the issue is quite clear.

I will get in touch with the team and we will try to fix this 😀

Sorry for the inconvenience.

/Alexandre

Panchev68
Senior

Is there a development 1 year after starting the topic?

Same problem with TouchGFX Designer 4.18.1

Hello Panchev68,

I'm very sorry, this issue was acknowledged by the dev team and added as an internal task but it seems from what you experienced that this is yet to be fixed.

I will push again to know the current status and to have it fixed as soon as possible.

Thank you for your feedback and sorry for the inconvenience.

/Alexandre