解码JPEG文件的一部分 [英] Decode part of JPEG file

查看:82
本文介绍了解码JPEG文件的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试加载有限内存占用的大JPEG文件(数百兆像素)的一部分.我只需要2000条左右的1000条扫描线.似乎libjpeg(及其fork libjpeg-turbo的当前实现)的当前实现无法提供无需解码即可跳过不需要的19k扫描线的方法.有没有解决它的方法,而无需深入研究libjpeg内部?

I'm trying to load part of big JPEG file (hundreds of megapixels) with a limited memory footprint. I need only about a 1000 scanlines of 20000. It seems that current implementation of libjpeg (as well as its fork libjpeg-turbo) doesn't provide a way to skip unneeded 19k scanlines without decoding them. Is there a workaround for it without digging into libjpeg internals?

推荐答案

一年前在jpeglib-turbo中实现了部分JPEG解码.我没有尝试过,但是我想它应该可以工作.

Partial JPEG decoding was implemented in jpeglib-turbo one year ago. I didn't try it, but I guess it should work.

检查:

添加进一步的部分解码优化#34

这篇关于解码JPEG文件的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆