Hello,
I want to render a jpeg image from the mapbean. Therefore i do the following:
com.bbn.openmap.image.SunJPEGFormatter formatter = newcom.bbn.openmap.image.SunJPEGFormatter();
formatter.setImageQuality(.8f);
byte[] imageBytes = formatter.getImageFromMapBean((MapBean)this.mapBean1);
try {
FileOutputStream binFile = new FileOutputStream("test.jpg");
binFile.write(imageBytes);
binFile.close();
System.out.print("written");
}
catch (Exception ex) {System.out.println(ex.toString());}
Where mapBean1 is filled with a map and labels etc. The funcion returns a black image. When I test the imageformatter on a
'normal' Graphics context, it works ok and returns an image filled with the drawn image. I already looked in the
AbstractImageFormatter where the function comes from. I didn't see weird things there.
Kind regards,
Martijn
Martijn van der Pauw, internetontwikkelaar.
Meteo Consult
martijn@weer.nl
tel: 0317 - 399800
fax: 0317 - 423164
http://www.weer.nl
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Mon Apr 15 09:58:24 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT