1

I want know if there any possible way to enlarge URLImage size using codenameone

this is the code: EncodedImage enc = EncodedImage.createFromImage(theme.getImage("i.png"), false); URLImage urlim = URLImage.createToStorage(enc, "test"+a.getId(), "http://127.0.0.1/armes_details_images/usp.png"); ImageViewer a1 = new ImageViewer(urlim);

Thank you for your help

ysf15
  • 31
  • 3

1 Answers1

0

The placeholder image determines the size of the downloaded image. That means that if the download image doesn't match the placeholder size it will be scaled/cropped and there are various API's within URLImage to determine how that scaling/cropping behaves.

Notice that you can always scale an image on the device but if you scale an image which was already scaled you will degrade quality further as every scaling operation degrades quality.

You can download the image as a file using various tools at which point it will be in the full resolution and you can scale it to any size you want. E.g. ConnectionRequest.downloadImageToStorage could be more in line with what you want.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65