开发者

Is it possible to do big size image process on applet on browser in java?

i want to run the applet on the browser in java.I have t开发者_运维技巧o load and manipulate big size images on the applet.

whether is it possible or not? can any body give me the resolution for the same.

Thanks, Mishal Shah


It mostly depends on how much memory the browser will give your VM. If it doesn't specify anything, you have 64MB with the Sun VM which limits how big the image in RAM can be.

But the actual image can be much bigger: Uncompress the image into a file and then use mmap'd file access (see FileChannel if your have Java 5). Then you can access the raw data and work on any image size (even though it will be slower than when you can keep the whole image in RAM).

If you have Java 1.4, you'll have to use RandomFileAccess and implement your own buffering strategy. That can be pretty slow, though, depending on the operations you want to support.

If that's not enough, your other options are to allow users to download the application or maybe Java WebStart.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜