Questions tagged [libpng]

libpng is the official PNG reference library, supporting most all of PNG's features, is extensible, and has been widely used and tested for over twenty years.

libpng is the official PNG reference library, that allows you to read, manipulate and write .png datastreams. It supports almost all PNG features, is extensible, and has been extensively tested for over twenty years.

libpng is a platform-independent library containing ANSI C (C89) source code. It requires zlib 1.0.4 or later (1.2.8 or later recommended) to be used.

For more information, visit the libpng website, sourceforge.io page where the source is available, the libpng manual or the Wikipedia page.

579 questions
190
votes
14 answers

libpng warning: iCCP: known incorrect sRGB profile

I'm trying to load a PNG image using SDL but the program doesn't work and this error appears in the console libpng warning: iCCP: known incorrect sRGB profile Why does this warning appear? What should I do to solve this problem?
Reza Karami
  • 2,135
  • 2
  • 11
  • 14
123
votes
11 answers

dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib with anything php related

Using any php application results in: dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib Referenced from: /usr/local/bin/php Reason: image not found [1] 4494 trace trap php Most of my php applications were installed using homebrew with…
user3458861
  • 1,251
  • 2
  • 8
  • 8
44
votes
6 answers

ImageMagick: Lossless max compression for PNG?

I'd like to achieve a maximum amount of compression when saving to a lossless PNG using ImageMagick. I'm doing batch conversion of many PSDs. I tried a few things, but it looks to me like the resulting PNG image is not as sharp as original image,…
Mladen Adamovic
  • 2,759
  • 2
  • 25
  • 42
43
votes
1 answer

Determining the CPU architecture of a static library (LIB) on Windows

I just built libpng on a 64-bit Windows machine using VS2008. It produces a libpng.lib file inside the \projects\visualc71\Win32_Lib_Release directory (Configuration used being "LIB Release"). I used dumpbin to inspect this LIB…
Sridhar Ratnakumar
  • 68,948
  • 61
  • 139
  • 172
26
votes
4 answers

How to encode PNG to buffer using libpng?

I'm currently using the following to write a PNG to a file: #include #include #include #include /* Pixels in this bitmap structure are stored as BGR. */ typedef struct _RGBPixel { uint8_t blue; …
Sam
  • 750
  • 2
  • 10
  • 19
25
votes
2 answers

Linking with libpng & zlib?

I'm trying to compile a project that uses both libjpeg and libpng. I know that libpng needs zlib, so I compiled all the three independently and put them (libjpeg.a, libpng.a and libz.a) on a folder called linrel32. What I execute then is: g++…
huff
  • 1,855
  • 2
  • 27
  • 49
24
votes
2 answers

write png quickly

Summary I want to write a .png file as quickly as possible, without a concern for compression. That is, I don't care much about the file size, but I do care that the write happens as quickly as possible. Motivation I am making a web-based map…
M Katz
  • 4,604
  • 3
  • 36
  • 59
23
votes
2 answers

.NET Image.Save occasionally generates a PNG with a bad IDAT chunk

I have a C#/.NET utility I wrote that loads PNG images from disk Bitmap b = Bitmap.FromStream(new MemoryStream(File.ReadAllBytes(filename))) as Bitmap; performs several transformations on them (rotation, scaling, alpha) and then saves the resulting…
David Welch
  • 341
  • 1
  • 7
20
votes
3 answers

error while loading shared libraries libpng16

I am trying to compile and run this code under ubuntu 14.04. I downloaded and installed libpng version 1.6.12. I am able to compile the code using gcc test.c -lpng but when I try to run it, I get this error: ./a.out: error while loading shared…
Michal Krakovsky
  • 755
  • 3
  • 7
  • 16
19
votes
1 answer

How to install libpng using yum?

how do I install libpng using yum on centos? I tried yum install libpng but that does not work Any help would be greatly appreciated
Chris Scott
  • 5,388
  • 10
  • 53
  • 123
18
votes
2 answers

How to install libpng-dev on windows?

I am trying to install the imagemin-pngquant module for node : https://www.npmjs.org/package/imagemin-pngquant However, when I run the command npm install imagemin-pngquant --save-dev I get the below error: warn : pngquant pre-build test failed …
Rich
  • 5,316
  • 9
  • 35
  • 58
16
votes
2 answers

Cannot build R package "png" Fedora 20

I am trying to build the R package png, the repo says that libpng needs to be available. I run a Linux Fedora 20 distro Looks like I have it... [root@localhost bin]# yum install libpng Loaded plugins: langpacks, refresh-packagekit Package…
statquant
  • 12,389
  • 13
  • 75
  • 148
14
votes
1 answer

How to display an image into an XCB window?

I'm having trouble displaying an image (PNG extracted with libpng) into an XCB window, it is always entirely empty/white. I'm pretty sure the PNG extraction is correct since I can perfectly re-write it into another file. I've tried everything I…
Razakhel
  • 715
  • 10
  • 30
13
votes
5 answers

meld - gi._glib.GError: Icon 'meld-change-apply-right' not present in theme. What is wrong with the installation?

I have managed to install the meld 3.14.2 and all the dependency packages, by compiling each package from source and all are installed on a NFS share with --prefix=/meldfor the meld tool && --prefix=/meld/deps for the…
GP92
  • 383
  • 1
  • 10
  • 29
11
votes
3 answers

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

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…
gordyr
  • 5,618
  • 13
  • 51
  • 118
1
2 3
38 39