initial commit
This commit is contained in:
commit
1f249051fd
|
@ -0,0 +1,2 @@
|
|||
.idea
|
||||
cmake-build-debug
|
|
@ -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)
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue