Search code examples
imagescalecodenameone

Label Image scale issue in Codename one library 3.3


We are using the following code to download image from our server and display it with a label:

ImageDownloadService.createImageToStorage(IconSrc, label, IconSrc, 
new Dimension(width,height), ImageDownloadService.PRIORITY_NORMAL);

After upgrading to the latest library 3.3, theimages are no longer scaled properly. It either only shows one corner of the image or scales the image up to fill the entire space.

This issue does not occur once I fall back to the older library 3.2.


Solution

  • Looking at the code of ImageDownloadService I don't quite understand how this functionality worked in the past.

    We don't really use that class internally and have recommended that developers migrate to the far superior URLImage class. I'll have a look at trying to fix that regression but I'd strongly suggest you migrate your code to the newer API.