我如何在Linux上读取C JPEG和PNG像素++? [英] How do I read JPEG and PNG pixels in C++ on Linux?

查看:806
本文介绍了我如何在Linux上读取C JPEG和PNG像素++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一些图像处理,我想在JPEG和PNG图像分别读取每个像素值。

I'm doing some image processing, and I'd like to individually read each pixel value in a JPEG and PNG images.

在我的部署方案,这将是尴尬,我使用第三方库(因为我已经限制在目标计算机上访问),但我假设有读取JPEG / PNG没有标准的C或C ++库...

In my deployment scenario, it would be awkward for me to use a 3rd party library (as I have restricted access on the target computer), but I'm assuming that there's no standard C or C++ library for reading JPEG/PNG...

所以,如果你知道的一种方式的的使用库再大,如果不是那么答案仍然欢迎!

So, if you know of a way of not using a library then great, if not then answers are still welcome!

推荐答案

有在C标准不标准库读取文件的格式。

There is no standard library in the C-standard to read the file-formats.

然而,大多数程序,尤其是在Linux平台上使用相同的库脱code中的图像格式:

However, most programs, especially on the linux platform use the same library to decode the image-formats:

有关JPEG它的libjpeg,对PNG它的libpng。

For jpeg it's libjpeg, for png it's libpng.

该库已安装的机率的非常的高。

The chances that the libs are already installed is very high.

http://www.libpng.org

http://www.ijg.org

这篇关于我如何在Linux上读取C JPEG和PNG像素++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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