Hi
I try to add dynamically Bitmap field but its not working plz help me .
My Code is
Code:
try
{
fc = (FileConnection)Connector.open(FILE_NAME, Connector.READ);
rootEnum = fc.list();
while (rootEnum.hasMoreElements())
{
file = (String)rootEnum.nextElement();
imgName=file.substring(0, file.length()-4);
DataContext dc=new DataContext();
byte[] data=(byte[])dc.get(imgName.trim());
EncodedImage eImage = EncodedImage.createEncodedImage(data,0,data.length);
int scaleFactorX = Fixed32.div(Fixed32.toFP(eImage.getWidth()),
Fixed32.toFP(60));
int scaleFactorY = Fixed32.div(Fixed32.toFP(eImage.getHeight()),
Fixed32.toFP(60));
eImage=eImage.scaleImage32(scaleFactorX, scaleFactorY);
bm_img[i] =(Bitmap) eImage.getBitmap();
row.add(new BitmapField(bm_img[i]));
row.add(new LabelField(imgName, DrawStyle.ELLIPSIS));
rows.addElement(row);
i++;
}
}catch(Exception e)
{
System.out.print(e);
}