I am surprised you got that far. I thought that javax.imageio was not part of Android. You should be able to do what you want like this (pseudo code):
inputstream = url.openStream() bitmap = BitmapFactory.decodeStream(inputstream) Using the url http://chart.apis.google.com/chart?cht=p&chd=t:37,0,50,12,1,0,0&chs=300x200 worked, but your longer posted one did not work then. I have not investigated this further, might have to do with some of the special chars not correctly encoded. HTH Ludwig 2008/10/29 AlBasha <[EMAIL PROTECTED]> > > I'm trying to get image file from Google Chart API. > Image link (strURL) = > > http://chart.apis.google.com/chart?cht=p&chd=t:37,0,50,12,1,0,0&chs=300x200&chl=Agriculture||Shrub/Grass|Trees|Built|Bare/Ice|Water&chco=FFFF66,ffffff,99FF66,006600,cc0000,cccc66,76A4FB&chf=bg,s,d3d3d3&chdl=Agriculture||Shrubs<http://chart.apis.google.com/chart?cht=p&chd=t:37,0,50,12,1,0,0&chs=300x200&chl=Agriculture%7C%7CShrub/Grass%7CTrees%7CBuilt%7CBare/Ice%7CWater&chco=FFFF66,ffffff,99FF66,006600,cc0000,cccc66,76A4FB&chf=bg,s,d3d3d3&chdl=Agriculture%7C%7CShrubs> > and Grass|Trees|Built|Bare or Ice|Water&chdlp=b > > Here is my java code: > URL url = new URL(strURL); > BufferedImage original = ImageIO.read(url); ---> Error when reach here > byte[] data = write(original, "png"); > > Here is the error : > javax.imageio.IIOException: Can't get input stream from URL! > at javax.imageio.ImageIO.read(Unknown Source) > > Any idea? > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

