www.leniwiec.org

scaler.c #include <gtk/gtk.h> #include <gdk-pixbuf/gdk-pixbuf.h> #define MID_WIDTH 1024 #define SMALL_WIDTH 120 int main(int argc, char **argv) { GdkPixbuf * pb, *s_pb, *m_pb; int width, height, m_height, s_height; g_type_init(); pb = gdk_pixbuf_new_from_file(argv[1], NULL); width = gdk_pixbuf_get_width(pb); height = gdk_pixbuf_get_height(pb); m_height = (int)(1.0 * height * MID_WIDTH / width); s_height = (int)(1.0 * height * SMALL_WIDTH / [...]

[ Czytaj dalej → ]