mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
lodepng 2019-06-16 (430268ba)
Code extracted from: https://gitlab.kitware.com/third-party/lodepng.git at commit 430268baa882a707c36b356402b94ab14dc08b69 (for/vtk-m).
This commit is contained in:
commit
a2a90a8bf8
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright (c) 2005-2018 Lode Vandevenne
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
65
README.md
Normal file
65
README.md
Normal file
@ -0,0 +1,65 @@
|
||||
LodePNG
|
||||
-------
|
||||
|
||||
PNG encoder and decoder in C and C++, without dependencies
|
||||
|
||||
Home page: http://lodev.org/lodepng/
|
||||
|
||||
### Documentation
|
||||
|
||||
Detailed documentation is included in a large comment in the second half of the
|
||||
header file lodepng.h.
|
||||
|
||||
Source code examples using LodePNG can be found in the examples directory.
|
||||
|
||||
An FAQ can be found on http://lodev.org/lodepng/
|
||||
|
||||
### Building
|
||||
|
||||
Only two files are needed to encode and decode PNGs:
|
||||
|
||||
* lodepng.cpp (or lodepng.c)
|
||||
* lodepng.h
|
||||
|
||||
All other files are just source code examples, tests, misc utilities, etc..., which
|
||||
are normally not needed in projects using this.
|
||||
|
||||
You can include the files directly in your project's source tree and its
|
||||
makefile, IDE project file, or other build system. No library is necessary.
|
||||
|
||||
In addition to C++, LodePNG also supports ANSI C (C89), with all the same
|
||||
functionality: C++ only adds extra convenience API.
|
||||
|
||||
For C, rename lodepng.cpp to lodepng.c.
|
||||
|
||||
Consider using git submodules to include LodePNG in your project.
|
||||
|
||||
### Building in C++
|
||||
|
||||
If you have a hypothetical main.cpp that #includes and uses lodepng.h, you can build as follows:
|
||||
|
||||
g++ main.cpp lodepng.cpp -Wall -Wextra -pedantic -ansi -O3
|
||||
|
||||
or:
|
||||
|
||||
clang++ main.cpp lodepng.cpp -Wall -Wextra -pedantic -ansi -O3
|
||||
|
||||
This shows compiler flags it was designed for, but normally one would use the
|
||||
compiler or build system of their project instead of those commands, and other
|
||||
C++ compilers are supported.
|
||||
|
||||
### Building in C
|
||||
|
||||
Rename lodepng.cpp to lodepng.c for this.
|
||||
|
||||
If you have a hypothetical main.c that #includes and uses lodepng.h, you can build as follows:
|
||||
|
||||
gcc main.c lodepng.c -ansi -pedantic -Wall -Wextra -O3
|
||||
|
||||
or
|
||||
|
||||
clang main.c lodepng.c -ansi -pedantic -Wall -Wextra -O3
|
||||
|
||||
This shows compiler flags it was designed for, but normally one would use the
|
||||
compiler or build system of their project instead of those commands, and other
|
||||
C compilers are supported.
|
5977
lodepng.cpp
Normal file
5977
lodepng.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user