libpng

PNG is not displaying...

Hello, I'm a newbie in iphone development so plz don't mind. I'm trying to draw PNG on my screen using libpng but its just displaying nothing on the screen. The code I'm using is: // Sets up matrices and transforms for OpenGL ES glViewport(0, 0, backingWidth, backingHeight); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrthof(0.0f, ...

libpng: write a bigger png than 1002px

Hey folks, I'm currently writing a c++ program which should write me a png file as output. So I made a little code, actually works. I just took the source code from here and condesed it. My code is nopasted here. BUT: It only works if it doesn't exceed 1002 pixels in width. I am very sure the problem is somewhere around lines 29/30, so...

Help converting a bitmap to a png in memory using libpng.

Basically I would like to convert a bitmap to a png using libpng but rather than outputting it to a FILE* I would like to output it to a char*. I have already seen this related post but I don't see where the bitmap data is actually used. Any help would be appreciated. ...

Compiling libpng and using it with netbeans and mingw.

I have only previously used visual studio for developing c++ but I've just moved to netbeans and am having some issues. I got mingw installed so that my projects will compile but I dont know how to add external libraries to that. I want to use a static library, not a dll. The library I specifically am looking at is libpng I hope this ...

Linking libpng with g++.

I'm trying to get libpng working on linux. I couldn't get it to work through netbeans, so I ran g++ directly as g++ -lpng -lz main.cpp -o test and it compiles. When I try to run it it it outputs ./test: error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory. I assume this means I a...

Loading PNGs with CImg

I am unable to load PNGs with CImg. I've heard you need to get libpng / zlib to get to work first but I am unsure how to set this up. I am on Ubuntu. My source: #include <cmath> #include <cstdio> #include <string> #include <assert.h> #include <stdarg.h> #define cimg_using_png #include "CImg.h" using namespace cimg_library; #include "pn...

How to use libpng with OpenGL for a 2D game?

I am beginning with OpenGL, and I want to make a very simple game with airplanes. Now I have a PNG of an airplane seen from above, and I want to draw this on the screen. Currently I only know how to draw triangles that rotate: float angle = 0.0f; void renderScene(void) { glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glRotatef(angl...

Linking libpng with Borland c++

I made a program on mac osx using opengl and dynamically linking libpng. Im now trying to port it to windows. Whenever I try to compile and link my ported program in borland it gives me this error and about 10 more that are the same but with a different '_png_create_read_struct' Error: Unresolved external '_png_create_read_struct' re...