initial commit

This commit is contained in:
antifallobst 2023-03-20 10:16:54 +01:00
commit 1f249051fd
4 changed files with 36 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.idea
cmake-build-debug

8
CMakeLists.txt Normal file
View File

@ -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)

26
main.c Normal file
View File

@ -0,0 +1,26 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <imago2.h>
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;
}

BIN
paris.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB