libpng

libpng not linked on Mac OSX 10.9.2

只谈情不闲聊 提交于 2019-12-06 00:34:21
问题 I installed matrix2png on my Mac and had used it without problem before last week when I installed another image manipulating tool "circos". Circos requires me to install a different version of libpng, and I did. After that, I am no longer able to run matrix2png, which gives me the following error. I think the old ligpnb is not linked any more. Does anyone know how to fix this error? - appreciate your help. dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib Referenced from: /usr/local

Centos php 扩展方式安装gd库的方法

自古美人都是妖i 提交于 2019-12-05 22:05:59
网站的第二台服务器跑的的环境主要是Python/Ruby,有时也需要简单跑跑PHP脚本,所以也安装了PHP,环境是Nginx+php-fpm,PHP是源码编译安装的,所以是最小化安装,甚至连mysqli扩展都没有。今天需要用到GD库,才发现没GD库环境,所以需要安装这个扩展。对付单个扩展,单独编译动态加载是比较方便快捷的。安装过程也比较繁杂,这个记录一下,方便后来者。 首先说明,我的PHP是源码编译安装的,可以参看 以源码编译的方式安装PHP与php-fpm。 先安装 gd 前置库 : freetype ,jpegsrc,libpng。 1. freetype 代码如下: wget "http://download.savannah.gnu.org/releases/freetype/freetype-2.4.0.tar.bz2" tar jxvf freetype-2.4.0.tar.bz2 cd freetype-2.4.0 ./configure --prefix=/usr/local/freetype && make && make install 2. jpegsrc 代码如下: wget "http://www.ijg.org/files/jpegsrc.v9.tar.gz" tar zxvf jpegsrc.v9.tar.gz cd jpeg-9 CFLAGS="

libpng load file from memory buffer

荒凉一梦 提交于 2019-12-05 07:04:12
I tried looking through the libpng documentation, but didn't find what I was looking for. I have a PNG file fully in a memory buffer, how can I load this file (apart from the obvious solution of creating a temporary file)? Not sure if it's relevant, but I'm calling libpng from Python using ctypes. orlp I found this article which describes pretty well how to read a PNG file from memory. Summarized, you have to create a custom callback function and give it to libpng using png_set_read_fn . Then in that callback function you read from your memory buffer rather than a file. 来源: https:/

Linking libraries with incompatible dependecies

故事扮演 提交于 2019-12-05 04:23:53
I'm working on a C++ project that needs two third party libraries ( libfoo.so and libbar.so ). My operating system is Linux. libfoo.so is dynamically linked to libpng14.so.14 (1.4.8) (EDIT 1) libbar.so seems to be statically linked to an unknwon version of libpng libpng 1.2.8 (EDIT 1) I say "seems to be" because: ldd libbar.so doesn't show nothing about png nm -D libbar.so | grep png_read_png says "004f41b0 T png_read_png" less libbar.so | grep png_read_png says "4577: 004f41b0 738 FUNC GLOBAL DEFAULT 10 png_read_png" When i start my program, it abort: terminate called after throwing an

Static libpng link with visual studio 2010

跟風遠走 提交于 2019-12-05 03:57:11
问题 I'm trying to add PNG support to my application and thus I want to include libpng. I know it needs zlib and thus I downloaded that as well. I went into the png folder/projects/vstudio and I opened the solution. I compiled it and it went just fine. I added some headers from it into my application and I copied the lib files. My program is a dll written in c++ which is later used from C#. When I run it in C# it complains about not finding my dll (tough if I remove the png part it works fine). I

Shell学习成果之一键自动安装PHP7.3

瘦欲@ 提交于 2019-12-05 02:33:14
系统:CentOS7.7.1908 PHP: *********************************************************************START**************************************************************************** #!/bin/bash #auto install php #by 网络虾米哥 2019-11-20 yum -y install gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

Rendering waveform in PHP - How to produce a more compressed render?

好久不见. 提交于 2019-12-05 01:05:58
I am rendering a waveform in PHP by downsampling it with the lame encoder and then drawing the waveform from the resulting data points. I am currently getting images like this: What I would like to do is modify my code so that the apparent dynamic range of the waveform is essentially 'compressed'. To produce a waveform that looks more like this: The equation I am currently using to render the height of each data point is as follows:- // draw this data point // relative value based on height of image being generated // data values can range between 0 and 255 $v = (int) ( $data / 255 * $height )

Linking libpng to android native project

若如初见. 提交于 2019-12-04 14:59:46
I am having problems trying to load libpng in my native android project. It seems, that the compiler doesn't recognize libpng functions, but does recognize types (like png_byte). It compiles normally with types, but throws errors if I add functions. Here's compile output (windows 7 cmd): D:\Dropbox\Workspace\Eclipse\GhostEngine\jni>C:\android-ndk-r8\ndk-build "Compile++ thumb : ghost <= ImagePng.cpp "Compile++ thumb : ghost <= MainAndroid.cpp "Compile++ thumb : ghost <= PlatformAndroid.cpp make: Circular D:/Dropbox/Workspace/Eclipse/GhostEngine//obj/local/armeabi/libst lport_static.a <- D:

PNG validation on iOS

牧云@^-^@ 提交于 2019-12-04 14:25:14
问题 Writing a mapping application on iOS, making use of OpenStreetMap tiles. Map tile images are downloaded asynchronously and stored in a dictionary, or persisted in a SQLite DB. Occasionally, for whatever reason, while attempting to render a map tile image, I get the following error: ImageIO: <ERROR> PNGinvalid distance too far back This causes nasty black squares to appear over my map. This is the piece of code in which this occurs: NSData *imageData = [TileDownloader RetrieveDataAtTileX:(int

LibPNG + Boost::GIL: png_infopp_NULL not found

人走茶凉 提交于 2019-12-04 13:44:32
I always get this error when trying to compile my file with Boost::GIL PNG IO support: (I'm running Mac OS X Leopard and Boost 1.42, LibPNG 1.4) /usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'void boost::gil::detail::png_reader::init()': /usr/local/include/boost/gil/extension/io/png_io_private.hpp:155: error: 'png_infopp_NULL' was not declared in this scope /usr/local/include/boost/gil/extension/io/png_io_private.hpp:160: error: 'png_infopp_NULL' was not declared in this scope /usr/local/include/boost/gil/extension/io/png_io_private.hpp: In destructor 'boost: