Skip to content

Commit

Permalink
Use STB's PNG writer instead of libpng
Browse files Browse the repository at this point in the history
  • Loading branch information
dressupgeekout committed Jul 14, 2022
1 parent e06b2e5 commit 0f86863
Show file tree
Hide file tree
Showing 8 changed files with 1,743 additions and 62 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

if(${LUNAPURPURA_PNG_SUPPORT})
message(STATUS "PNG support enabled")
find_package(PNG REQUIRED)
set(LUNAPURPURA_PNG_SUPPORT_FLAGS "-DLUNAPURPURA_PNG_SUPPORT")
endif()

include(FindPkgConfig)
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ If you turn on the mruby bindings, you need to also define the following:
- PATH `MRUBY_INCLUDEDIR` -- Location of mruby's header files
- PATH `MRUBY_LIBDIR` -- Location of mruby's library

If you turn on PNG support (enabled by default), then you must have the
libraries and development headers for zlib and libpng installed.


### build.sh Usage

Expand Down
2 changes: 2 additions & 0 deletions src/lputil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ list(APPEND lputil_SOURCES
)

list(APPEND lputil_HEADERS
lpstb_image_write.h
lputil.h
stb_image_write.h
)

# This distribution of getopt(3) and friends is based on NetBSD's
Expand Down
6 changes: 6 additions & 0 deletions src/lputil/lpstb_image_write.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* This file is part of Luna Purpura.
*/

#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
Loading

0 comments on commit 0f86863

Please sign in to comment.