Skip to content

Commit

Permalink
example1: replace old stb_image 1.18 with stb_image 2.30 and stb_imag…
Browse files Browse the repository at this point in the history
…e_write 1.16

Pulled from https://github.com/nothings/stb
Commit 013ac3beddff3dbffafd5177e7972067cd2b5083
  • Loading branch information
illwieckz committed Jun 25, 2024
1 parent 902de59 commit b8af4d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4,204 deletions.
1 change: 0 additions & 1 deletion example1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ include_directories(
# Defines the source code for the library
set(EXAMPLE1_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/example1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/stb_image.h
)

add_executable(example1 ${EXAMPLE1_SRCS})
Expand Down
6 changes: 6 additions & 0 deletions example1/example1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
#pragma warning(disable : 4244) // conversion from 'int' to 'uint8', possible loss of data
#pragma warning(disable : 4100) // unreferenced formal parameter
#endif

#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"

// windows.h is only needed here for GetSystemInfo().
#define WIN32_LEAN_AND_MEAN
Expand All @@ -28,6 +32,8 @@

using namespace crnlib;

typedef unsigned int uint;

const int cDefaultCRNQualityLevel = 128;

static int print_usage() {
Expand Down
Loading

0 comments on commit b8af4d2

Please sign in to comment.