classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UrlConnection and images


From: Robert Schuster
Subject: Re: UrlConnection and images
Date: Thu, 10 Mar 2005 03:08:35 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20050107

Hi,
Michael Koch said he has a patch for ImageIO that will fix image loading via URL. Currently it fails.

cu
Robert

Fawzib Rojas wrote:

It seems that UrlConnection.getContent() for image/gif should return an ImageProducer object. I guess doing something like...

package gnu.java.net.content.image;

import java.net.ContentHandler;
import javax.imageio.ImageIO;

public class gif extends ContentHandler{
 public Object getContent(URLConnection urlc) throws IOException{
   return ImageIO.read(urlc.getInputStream()).getSource();
 }
}

...might work. I guess there is more to it than this? It seems too simple to be missing. Are the ImageIO classes working? I'm trying to use Apache FOP and it fails because of this. I tried to compile classpath myself but I havent been able to. Can anyone check it out?



_______________________________________________
Classpath mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/classpath






reply via email to

[Prev in Thread] Current Thread [Next in Thread]