commit 1f249051fd89104711902fbb593b160db6de9ce9 Author: antifallobst Date: Mon Mar 20 10:16:54 2023 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8e24b65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +cmake-build-debug diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d573ae2 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.23) +project(Juniorcamp C) + +set(CMAKE_C_STANDARD 99) + +add_executable(Juniorcamp main.c) + +target_link_libraries(Juniorcamp imago) \ No newline at end of file diff --git a/main.c b/main.c new file mode 100644 index 0000000..94ad514 --- /dev/null +++ b/main.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include + +typedef struct { + uint32_t width; + uint32_t height; + uint8_t* buffer; +} image_T; + +int main() { + printf("Line Cutter - Juniorcamp Informatik\n"); + + const char* filename = "../paris.png"; + + printf("loading '%s'...\n", filename); + image_T image; + image.buffer = img_load_pixels(filename, (int*)&image.width, (int*)&image.height, IMG_FMT_RGBA32); + + + printf("destructing resources\n"); + img_free_pixels(image.buffer); + + return 0; +} diff --git a/paris.png b/paris.png new file mode 100644 index 0000000..d9e5e27 Binary files /dev/null and b/paris.png differ