libpng

libpng error: PNG unsigned integer out of range

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When trying to read a PNG from memory I came across this funky error: libpng error:: PNG unsigned integer out of range This error is caused by png_read_info(png_ptr,info_ptr); Which uses following handler: static void ReadDataFromBuffer(png_structp png_ptr, png_bytep outBytes, png_size_t byteCountToRead){ PNGDataPtr dataptr=(PNGDataPtr)png_get_io_ptr(png_ptr); png_uint_32 i; cout<<byteCountToRead<<endl; cout<<&outBytes<<endl; cout<<dataptr->len<<endl; cout<<dataptr->p<<endl; if(byteCountToRead>dataptr->len){ png_error(png_ptr,"EOF"); return;

libpng warning: iCCP: known incorrect sRGB profile

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to load a PNG file using SDL but the program doesn't work and this error appears in the console "libpng warning: iCCP: known incorrect sRGB profile" Why this warning appears? what should I do to solve this problem? 回答1: Libpng-1.6 is more stringent about checking ICC profiles than previous versions. You can ignore the warning. To get rid of it, remove the iCCP chunk from the PNG image. Some applications treat warnings as errors; if you are using such an application you do have to remove the chunk. You can do that with any of a

Xcode 6 giving “LIBPNG ERROR TOO MANY IDAT&#039;S FOUND” error

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Are there good tools for checking PNG files for issues that can be how I have ended up here? At first i feared with was an issue with the many thousands of "tiles" in my learning app (at 3 resolutions), but it seems one or more specific png files have an internal issue. 回答1: pngcheck works well and is a good resource. In addition, an OS-X app (in the app store) called "Quick Opaque" easily stripped out the (unneeded) alpha channel data from my png file, which cured the IDAT problem. 文章来源: Xcode 6 giving “LIBPNG ERROR TOO MANY IDAT'S FOUND”

Matplotlib install failure on Mac OSX 10.8 Mountain Lion

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to install matplotlib on my MacBook Air, but it always gives me this error message: Processing matplotlib-1.1.1_notests.tar.gz Running matplotlib-1.1.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3jFpXK/matplotlib-1.1.1/egg-dist-tmp-jC7QY3 basedirlist is: [] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.1.1 python: 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] platform: darwin REQUIRED DEPENDENCIES numpy

libpng crashes on png_read_info()

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to read a png file using libpng 1.2.10 in vs2013. I downloaded the latest zlib and compiled pnglib, which worked fine. Now I'm trying to load a file: int *w = &width; int *h = &height; const char* name = file.c_str(); FILE *png_file = fopen(name, "rb"); if (!png_file) { std::cerr << "Could not open " + file << std::endl; return; } unsigned char header[PNG_SIG_BYTES]; fread(header, 1, PNG_SIG_BYTES, png_file); if (png_sig_cmp(header, 0, PNG_SIG_BYTES)) { std::cerr << "PNG signature fail " + file << std::endl; return; } png_structp

How to handle “gd-png: fatal libpng error: Read Error: truncated data” in php 7

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use php 7.0.22 (Ubuntu 17.04) When some user upload PNG with truncated data and i use: $a = imagecreatefrompng($path); then I get crash with: Fatal error: imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data in ###.php on line ### I try to use try{...code...}catch(\Throwable $e){...echo...}. and $a = @imagecreatefrompng($path); But script just dies with same error message. Use of imagecreatefromstring(file_get_contents($path)) has same result. My validation of PNG: I use function getimagesize($filename) returns

qrencode库的使用

匿名 (未验证) 提交于 2019-12-03 00:38:01
1、在 https://fukuchi.org/works/qrencode/ 下载qrencode库,我下的是 qrencode-4.0.2.tar.gz 版本。 我下载的是 https://cmake.org/files/v3.12/cmake-3.12.0-rc1-win64-x64.msi 版本 安装cmake-3.12.0-rc1-win64-x64.msi后,设置系统路径: 3、解压 qrencode-4.0.2.tar.gz ,使用cmd命令打开命令行,进入该目录,使用命令: cmake . -DGETOPT_INCLUDE_DIR="库头文件所在目录" -DGETOPT_LIBRARIES="库文件所在目录" 因为该库的示例代码使用了libpng库生成二维码图片,而libpng库又依赖zlib库,所以你需要下载libpng和zlib库,头文件和库文件对应放在cmake命令的"库头文件所在目录"和"库文件所在目录"。如果你嫌麻烦,可以直接生成bmp格式的图片,就不需要链接这两个库了,见以下内容。 4、不链接libpng和zlib,则直接使用命令:cmake . -DGETOPT_INCLUDE_DIR="" -DGETOPT_LIBRARIES="" 虽然也报了找不到png的错误,但不重要,这个时候该目录下已经生成了QRencode.sln解决方案。 5

ubuntu13.10源码安装php5.5

末鹿安然 提交于 2019-12-02 18:02:37
1.下载PHP软件 2.tar解压 tar -zxvf /home/sniper/Downloads/php-5.5.10.tar.gz 3.下载libxml2 http://xmlsoft.org tar解压 ./configure make make install 4.如果安装过libxml2,可以跳过3,安装libxml2-dev sudo apt-get install libxml2-dev 5.安装PHP语法分析器re2c,Bison sudo apt-get install re2c sudo apt-get install Bison 6.安装加密算法扩展库libmcrypt 下载libmcrypt2.5.8.tar.gz tar -zxvf libmcrypt2.5.8.tar.gz cd libmcrypt2.5.8 ./configure make & make install 7.安装PHP依赖库zlib wget http://zlib.net/zlib-1.5.8.tar.gz tar解压到/usr/local/zlib 进入zlib ./configure --prefix=/usr/local/zlib make make install 8.安装PHP依赖库libpng 下载libpng tar 解压 cd libpng文件夹 .

SDL以及扩展库的交叉编译过程简介

核能气质少年 提交于 2019-12-01 23:32:44
********************************** Writen by Rao 2012年04月20日 星期五 21时57分16秒 ********************************** 下面我介绍一下SDL以及SDL的扩展库在arm11上的交叉编译 在这里我将SDL 交叉编译的相关都安装在/opt/arm目录下 相关简介: SDL官方网站 http://www.libsdl.org/ SDL编译移植(Up-teach6410平台) 系统环境:linux 移植环境:arm11 编译工具链:gcc-4.3.1(系统默认工具链) 1.1 编译jpeg-7 软件名称 libjpeg 功能描述 libjpeg是一个用c语言编写支持jpeg解码、编码的库 下载地址 http://linux.softpedia.com/get/Programming/Libraries/libjpeg-160.shtml 软件版本 jpegsrc.v7.tar.gz 依赖关系 默认 1.2 编译libiconv-1.14 软件名称 libiconv 功能描述 libiconv库为需要做转换的程序,实现了一个字符编码到另一个字符编码的转换 下载地址 http://www.gnu.org/software/libiconv/#downloading 软件版本 libiconv-1

libpng “png_set_longjmp_fn” not found

青春壹個敷衍的年華 提交于 2019-12-01 16:57:12
I'm using libpng from ubuntu and when I try to compile a c++ file I get undefined reference to `png_set_longjmp_fn' I'm using libpng version 1.6.8 If you are interested in reading the code please let me know, but I do not this has to do with my bad code. Thank you in advance. Perhaps you have built with libpng-1.6.8 but are linking to an earlier version of libpng. The "png_set_longjmp_fn()" API was introduced in libpng-1.4.x. Ubuntu 13:10 currently comes with libpng-1.2.49 (see /usr/include/libpng12), which does not supply png_set_longjmp_fn(). If you do this on an older Playstation Portable