swappy/include/pixbuf.h
Jeremy Attali cdbd06d7af fix(pixbuf): handle invalid input file
If the input file is invalid (example: `grim` did not work due to
invalid geometry), handle the error gracefully.

Previously we had a coredump due to `g_error`.
2021-02-27 14:34:23 -05:00

14 lines
556 B
C

#pragma once
#include "swappy.h"
GdkPixbuf *pixbuf_init_from_file(struct swappy_state *state);
GdkPixbuf *pixbuf_get_from_state(struct swappy_state *state);
void pixbuf_save_state_to_folder(GdkPixbuf *pixbuf, char *folder,
char *filename_format);
void pixbuf_save_to_file(GdkPixbuf *pixbuf, char *file);
void pixbuf_save_to_stdout(GdkPixbuf *pixbuf);
void pixbuf_scale_surface_from_widget(struct swappy_state *state,
GtkWidget *widget);
void pixbuf_free(struct swappy_state *state);