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
0
votes
1 answer

C++, Allegro, Ubuntu, and libpng/LoadPNG

I've been looking around for quite a while, but I haven't quite been able to hit on a source answering my question. I want to use PNGs with Allegro. I know about libpng and loadpng for Allegro, but I don't know what to do with these. Obviously, I'm…
Ben Dixon
  • 175
  • 1
  • 5
0
votes
1 answer

libpng: writing a png fails: stops at header write error

I can't figure out what is wrong. When I try to write the PNG, I get an error: "Error during writing header". Do I need to include something else? I took the .lib/.h files from here: http://www.eden.net.nz/7/20071024/ Edit: I finally managed to…
Rookie
  • 3,648
  • 5
  • 50
  • 84
0
votes
2 answers

Crash in png_set_read_fn() on Windows 7

I'm cross-compiling some C code for Windows 7 and linking to libpng12.dll found here. Unfortunately, the line below causes a crash (GDB says segmentation fault): png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); I'm…
andyvn22
  • 14,453
  • 1
  • 46
  • 74
0
votes
1 answer

Loading image with libpng produces unexpected pixel data

I have problems trying to load png file into my application. It seems to load headers fine, and recognize that image is png, but for some reason the output has the same values, though image is really not one color. Another thing that bugs me is that…
SMGhost
  • 3,156
  • 3
  • 24
  • 60
0
votes
1 answer

Someone explain why this isn't filling in the square

It's just making a red line along the top and left edge and I don't understand why. Shouldn't the nested for loops iterate through every possible x,y coordinate? function createSquare() { var height = 50; var width = 50; var img = new…
JOATMON
  • 15,576
  • 31
  • 99
  • 188
0
votes
1 answer

Why Memory allocation failed whe HPDF_LoadPngImageFromFile using libhpdf?

I got a exception ERROR: error_no=1015, detail_no=0 using HPDF_LoadPngImageFromFile to load a png file with a jpeg file extention.I have libpng and libpng-dev installed. I can not figure out why this exception occurs. Anyone help me? Thanks.
Treper
  • 3,119
  • 2
  • 24
  • 44
0
votes
1 answer

Trying to write 16-bit PNG

I'm capturing images from camera, and I have two function for saving 16-bit(!) image one in PNG and one in TIFF formats. Could you please explain why the PNG is a very noisy image? like this: PNG function: bool save_image_png(const char…
Grammer
  • 311
  • 1
  • 4
  • 13
-1
votes
2 answers

How to get the alpha value of a pixel in libpng?

How can I get the alpha value of a pixel with the libpng. The pixels values are stored int a std::vector>. The RGB values are correctly decoded but the alpha value is sometimes 255 ! I thought that the alpha value should be…
PacCol
  • 335
  • 1
  • 13
-1
votes
1 answer

What is the declaration of data type "png_byte" in png.h library C?

Here, at the GitHub repo png.h library source code is given (https://github.com/LuaDist/libpng/blob/master/png.h). But there also, directly they use the data type png_byte. I am looking for the declaration of this data type.
-1
votes
1 answer

How to use libpng in CodeBlocks on Windows?

I have managed to install (I think) it with the setup provided by their website, but I have no idea what to do next. It created a folder called GnuWin32 in Program Files (x86) but it doesn't seem to do anything.
-1
votes
1 answer

libpng warning in python opencv2

I managed to install and successfully import cv2 on a linux(Debian) virtual machine, using python 2.7. I tried to take a picture using my webcam with the following piece of code: import cv2 from datetime import datetime tar_file =…
eclipse
  • 107
  • 1
  • 3
  • 12
-1
votes
1 answer

AppVeyor c++ cmake PNG package compilation error

I am trying to compile a cross platform QT Application for windows via AppVeyor with cmake. Under Linux the cmake compiles just fine, so the CMakeLists.txt should be valid. AppVeyor compiles a necessary library, which works, too. But when it comes…
zebastian
  • 1
  • 1
-1
votes
1 answer

Ubuntu: Updating libpng

I had a need to run the Ubuntu utility "convert", and when I did I got an error message that my version of libpng was out of date and had to be updated. So, I went the usual route of "apt-get install", but for reasons I now no longer remember, this…
Peter P
  • 39
  • 5
-1
votes
1 answer

matrix2png installation in MAC OSX and libpng-1.6.17

I'm trying to install matrix2png. So, I have installed libpng using Homebrew. But, when I type ./configure to install matrix2png, the following error message comes up: You need to have libpng installed and findable by the configure script Please…
se2se2
  • 1
-1
votes
1 answer

How to build libpng using gcc?

I am currently working on a program that will have to be able to read and save PNG files. I've decided to use libpng so I've downloaded it's source files. I unpacked them and here is where my problem started. There are very many files in the…
1 2 3
38
39