非常大的图像处理和平铺

编程入门 行业动态 更新时间:2024-10-26 04:27:25
本文介绍了非常大的图像处理和平铺的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要一个Java软件或程序或一个非常大的图像(大于140MB)的方法。 我使用了ImageMagick并转换了工具Photoshop和Corel Draw和Matlab(在Windows中),但我遇到了内存过载的问题。 ImageMagick非常慢,结果不可取。我不知道如何在不加载硬盘的整个图像的情况下,只将一小部分图像加载到内存中。

I need a software or program in Java or a method for tiling very large images (bigger than 140MB). I have used ImageMagick and convert tools Photoshop and Corel Draw and Matlab (in Windows), but I have a problem with memory overload. ImageMagick is very slow and result is not desirable. I don't know how can I only load a small part of image to memory without loading the whole image from harddisk.

推荐答案

JAI依赖于平台,今天似乎是一个死的项目。

JAI is platform dependent and seems like a dead project today.

我建议使用开源程序 imagemagick 即可。虽然它依赖于平台,但它可以与JAI使用相同的平台,但具有完全的社区支持。

I advise using the open-source program imagemagick. Although it is platform dependent, it is available for the same platforms as JAI, but with full community support.

关于imagemagick的大图像的诀窍是使用它的 stream - 命令而不是转换命令。 Stream仅读取图像的相关部分,并将提取的部分保存为原始数据。然后,您需要转换以将小原始数据保存为jpeg。

The trick about large images about imagemagick is using its "stream"-command instead of the convert command. Stream only reads the relevant portion of the image and saves the extracted part as raw data. You then need "convert" to save the small raw data as jpeg.

将大小为800x600的large.jpeg从位置0x0保存到tile.jpeg的示例:

Example to save a tile from large.jpeg of size 800x600 from position 0x0 to tile.jpeg:

stream -extract 800x600+0+0 large.jpeg tile.rgb convert -depth 8 -size 800x600 rgb:tile.rgb tile.jpeg

(在Windows上运行时,请务必使用ImageMagick的convert.exe,因为有一个名为convert的Windows命令。)

(When running on windows, be sure to use ImageMagick's convert.exe, as there is a windows command named "convert".)

仅使用TIFF图像时,apache Sanselan 可能是正确的选择 - 它是纯粹的java成像库。此外,JAI似乎包含一个独立于平台的TIFF编解码器。

When working with TIFF-images only, apache Sanselan could be the right choice - it is a pure-java imaging lib. Also, JAI seems to contain a platform independent codec for TIFF.

更多推荐

非常大的图像处理和平铺

本文发布于:2023-11-11 10:58:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1578236.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:平铺   非常大   图像处理

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!