开发者

image processing between Java and Android

I have a problem where I have a program that takes an image file as input on a Java desktop program, processes it and now I need to send this ima开发者_如何转开发ge from the Java application to an Android handset.

In Java I have it stored as either a ImageIcon or BufferedImage and I need to turn it into an Android Drawable, preferably without sending the file back to disk.

I am using the latest in Java and Android 1.6

Currently using a RESTful webserver sitting between the Java Desktop application and the Android handset to assist communications.


I think you'll have to create a web server to send the file to the device.

You don't need a full-fledge server. Listening localhost in some specific port that you may choose should be enough.

Then, you'd open the device and open your application (or simply the browser if you only want to dowload/view the image) and open the address of your server.

The simplest version would be creating a server in your computer (localhost), for instance using port 5555 and then go to the browser and open a page with the ip address/port of your computer.

Here is a tutorial on listening to a local port with java

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜