libpng

can not read png file with libpng

亡梦爱人 提交于 2019-12-10 22:44:15
问题 I am new to libpng and the documentation is really confusing for me. Below is my code which is not working and I do not see the reason why. Can someone point me to right direction? or suggest different ( "easier" ) library? how I understand libpng: open the file with fopen in rb mode create png_structp with png_create_read_struct create png_infop with png_create_info_struct allocate space read data #include <stdio.h> #include <png.h> int main( int argc, char **argv ) { int x, y; int height,

Visual Studio 2013 and libpng [duplicate]

谁说我不能喝 提交于 2019-12-10 22:06:28
问题 This question already has answers here : What is an undefined reference/unresolved external symbol error and how do I fix it? (32 answers) Closed 4 years ago . I'm trying to write a simple PNG file using libpng in C using VS2013. I installed libpng from Nuget and included png.h, but I can't compile. I get this as my output: 1>main.obj : error LNK2019: unresolved external symbol png_create_write_struct referenced in function writeImage 1>main.obj : error LNK2019: unresolved external symbol png

Compile a C program with libpng on Mac OS X

人走茶凉 提交于 2019-12-10 20:14:23
问题 I have a little utility I wrote in C that uses libpng. Under linux, I just install libpng-dev and do "gcc myapp.c /usr/lib/libpng.so -o myapp". In Mac OS X, I have the Xcode tools installed, which I believe includes libpng. What do I link against, and do I need to specify an include path for png.h? 回答1: Try /usr/X11/include/png.h - you'll find the libs in ../lib ( or /usr/X11/lib ) as well. EDIT Mavericks doesn't appear to have this anymore. You may need to use homebrew or MacPorts to install

What's the quickest and easiest way of getting libpng available for development in VisualStudio2008?

送分小仙女□ 提交于 2019-12-10 19:26:43
问题 I have some C++ code which uses boost's GIL image library, and wants to write files using boost::gil::png_write_view from boost/gil/extension/io/png_io.hpp . That header itself includes png.h , and of course results on a link dependency. On Debian it compiles and links fine. If it did complain about anything missing, the necessary headers and libs would be a few seconds away via an aptitude install libpng-dev . On Windows (VisualStudio 2008 on XP64), I'm having to face the idea that it looks

<png.h> not found in mac os X mavericks

不羁的心 提交于 2019-12-10 16:13:40
问题 I tried (apparently successfully) to install libpng on mac os x mavericks. I downloaded the latest 1-6-8 version .tar.xz and followed the instructions. ./configure runs fine make check passes everything but png-error that gets skipped sudo make install apparently works fine since my library libpng. appears. Now, when i try to compile the C file that i need to compile, using the string clang -w -lz -lpng16 libpng_test.c i get the error fatal error: 'png.h' file not found #include <png.h> and

No PNG support in PHP GD Library but has GIF and JPEG Support. How can I fix this?

血红的双手。 提交于 2019-12-10 15:45:12
问题 I am running MAMP server Version 3.0.5 on OS X Yosemite. It seems to be missing PNG Support on my php files during execution Even before when I had MAMP 2.1, it had fatal errors on png related functions. The Jpeg functions work fine though. This is what my phpinfo looks like : Build Date Apr 10 2014 17:21:18 Configure Command './configure' '--with-mysql=/Applications/MAMP/Library' '--with-apxs2=/Applications/MAMP/Library/bin/apxs' '--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library' '-

安装libpng出现configure: error: ZLib not installed

限于喜欢 提交于 2019-12-10 15:15:42
1.问题描述 安装libpng出现configure: error: ZLib not installed 2.解决方案 1.进入zlib的源文件目录,执行命令 make clean,清除zlib; 2.重新配置 ./configure,后面不要接--prefix参数; 3.编辑 make && make install 安装; 4.进入libpng目录,执行命令 ./configure --prefix=/usr/local/libpng; 5.编译 make && make install 安装; 结果还是不行, 3.其他 解决办法: 执行以下命令: #export LDFLAGS="-L/usr/local/zlib/lib" #export CPPFLAGS="-I/usr/local/zlib/include" 来源: oschina 链接: https://my.oschina.net/u/123905/blog/199764

GraphicMagic安装说明

淺唱寂寞╮ 提交于 2019-12-10 15:15:28
GraphicMagic安装说明 GraphicMagic号称图片处理的瑞士军刀,可以处理包括图片压缩、补白、水印等等一系列的功能;GraphicMagic到官网下载,解压之后,需要在本地进行相应的 make install 处理; 此处列出一些注意事项; GraphicMagic 依赖的包包括:zlib , libpng(处理png图片) , libjpeg(处理jpg图片);所以在安装GraphicMagic之前要先安装以上三个包; zlib安装 rpm -qa | grep zlib 查看软件安装情况; zlib安装: 解压; 在目录下执行./configure --prefix=需要安装的目录 执行命令: make test或make make install 安装完成之后,为避免与系统提供的zlib包冲突,需要将zlib包加入当前用户的环境变量;步骤如下: 修改 .bash_profile文件 vi .bash_profile 并在其中增加以下环境变量: export LD_LIBRARY_PATH=zlib安装目录/lib:$LD_LIBRARY_PATH export C_INCLUDE_PATH=zlib安装目录/include:$C_INCLUDE_PATH export CPLUS_INCLUDE_PATH=zlib安装目录/include:$CPLUS

调用png格式图片时“libpng warning: iCCP: known incorrect sRGB profile”警告

喜夏-厌秋 提交于 2019-12-10 14:18:44
如果使用某些格式png图片,可能会报警告libpng warning: iCCP: known incorrect sRGB profile,但是这并不会影响编译。 现在分享一款软件只要另存一下就解决问题了。 https://download.csdn.net/download/jingbaojoj/12022858 来源: CSDN 作者: 江平 链接: https://blog.csdn.net/jingbaojoj/article/details/103468409

Worst PNG compression scenario

。_饼干妹妹 提交于 2019-12-10 12:19:00
问题 I am using libpng to convertraw image data (3 channel, 8 bit, no metadata) to PNG and store it in a buffer. I now have a problem to allocate the right amount of buffer space for writing the PNG data to it. It is clear to me, that the compressed data might be larger than the raw data (cf. the overhead for a 1x1 image) Is there any general rule for an upper margin of the compressed data size with respect to the image size and the different filtering/compression options? If that is too generic,