Note that there are some explanatory texts on larger screens.

plurals
  1. POPNG Image is badly stained when set as LWUIT Form's background image
    text
    copied!<p>I want to make a <code>png</code> Image as the background image of a LWUIT Form. The problem is that the image is altered : there are stains in the image after setting it as the Form's background image. Here are codes :</p> <pre><code>public class DetailPhotoClient extends Form implements ActionListener { private Command options, delete, back, annuler, ok; private GaleriePhotos backForm; private FileConnection fcFile; private Image sourceImage, fullImage; private InputStream is; private PopupMenu popup; public DetailPhotoClient(GaleriePhotos prevForm, String absolutePathphotoName) { super(); back = new Command("Retour"); options = new Command("Options"); this.addCommand(back); this.addCommand(options); this.addCommandListener(this); delete = new Command("Supprimer"); annuler = new Command("Annuler"); ok = new Command("Ok"); backForm = prevForm; try { fcFile = (FileConnection) Connector.open(absolutePathphotoName, Connector.READ); is = fcFile.openInputStream(); sourceImage = Image.createImage(is); fullImage = createThumbnail(sourceImage); setBgImage(fullImage); is.close(); fcFile.close(); } catch (IOException ex) { handleException(); } catch (OutOfMemoryError oom) { handleOOM(); } } private Image createThumbnail(Image image) { Image thumb = image.scaled(this.getPreferredW(), this.getPreferredH()); return thumb; } ... } </code></pre> <p>I noticed that when I open the photo manually , that is from the phone memory's photo folder , then the photo is not altered !</p> <p>So how to make the image not altered when setting it as the Form's background image ?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload