简体   繁体   English

使用更少的内存放大已经很大的 jpeg

[英]Enlarge already big jpegs using less memory

I need to enlarge already big jpegs, they are used on printing so they need to be really big 300PPI files.我需要放大已经很大的 jpeg,它们用于打印,因此它们需要非常大的 300PPI 文件。 The resulting image will be too big to be fully hold in memory.生成的图像太大而无法完全保存在内存中。 What i thought was something like breaking the original image into small strips, enlarge each one of them separatedly and go writing it in the output file(another jpeg), never keeping the final image fully on menoru.我的想法是将原始图像分成小条,分别放大每一个并将其写入输出文件(另一个 jpeg)中,永远不要将最终图像完全保留在菜单上。 I've read about lossless operations on jpegs it seems the way to go(create a file with the strip and copy the mcus, huffman tables and quantizatuon tables to the final file), also read something about abbreviated streams on java.我读过关于 jpegs 的无损操作这似乎是要走的路(用条带创建一个文件并将 mcus、huffman 表和量化表复制到最终文件),还阅读了一些关于 java 上的缩写流的内容。 What is a good way to do this?有什么好的方法可以做到这一点?

Your best bet is to leave the JPEGs alone and have the printing software scale the output to the device.最好的办法是不要管 JPEG,让打印软件将输出缩放到设备。

If you really want to double the size,you could use subsampling.如果你真的想加倍大小,你可以使用子采样。 Just double the Y component in each direction and change the sampling for Cb and Cr while leaving the data alone.只需将每个方向的 Y 分量加倍并更改 Cb 和 Cr 的采样,同时保留数据。

You could also do as you say, and recompress in strips of MCUs.你也可以按照你说的做,然后重新压缩成 MCU 条。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM