title: How should I use libpng library to convert RGBA bitmap into PNG and PNG back to RGBA bitmap
body: <p>I try to use libpng library, and I encounter problem with it. </p>
  
  <p>I am using CLion now, and try to include this libpng library in my project. 
  The problem is rather with configuration of this library to use it in my project than using this library. I think that I can make copy all *.c, *.h files from libpng into my own project in CLion, make from it static library liblibpng.a and just link against it. I even compiled liblibpng.a but when I try to use it, i.e. simple including ${path}/libpng-x.x.x/png.h there are errors and warnings in the png.h file like lack of <code>png_uint_32</code> definition. Ok I can typedefine this somehow like <code>unsigned int</code>. </p>
  
  <p>I am trying to read README.txt, and other manuals/documantations, INSTALL.txt? But there is a lot os possibilities, and I just want to include png functionalities in my project. Why there is need to install this library? I want that my app after creation in the future will be easly portable to other computers without 3rd party libraries installation needed at all. </p>
  
  <p>My question is hot to easily start using this libpng, and porbably also zlib libraries in my own project in CMake, I prefer static library linking, I don't want any specific installation, etc. </p>
  
  <p>I think I have a problem with this declaration as this instead of defining <code>png_uint_32</code> just throw error! It is from <strong>pngconf.h</strong></p>
  
  <pre><code>#if UINT_MAX &gt; 4294967294
     typedef unsigned int png_uint_32;
  #elif ULONG_MAX &gt; 4294967294
     typedef unsigned long int png_uint_32;
  #else
  #  error "libpng requires an unsigned 32-bit (or more) type"
  #endif
  </code></pre>