png
LWUITフォームの背景画像として画像を作りたいです。問題は、画像が変更されていることです。フォームの背景画像として設定した後、画像に汚れがあります。ここにコードがあります:
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;
}
...
}
電話のメモリの写真フォルダから手動で写真を開くと、写真が変更されていないことに気付きました。
では、フォームの背景画像として設定するときに画像を変更しないようにするにはどうすればよいですか?