From 6dfea8ddd0b7cb717fc120dc68edc42b0e1fbdd8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 29 Jun 2020 13:55:20 +0200 Subject: Break render.c down and move to geoptimiser and CrystFELImageView These two functions will diverge in the future. Also, this change removes the last remaining dependency of libcrystfel on Gdk/Gtk-anything. --- src/geoptimiser.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'src/geoptimiser.c') diff --git a/src/geoptimiser.c b/src/geoptimiser.c index ec4fbcd4..385a85d4 100644 --- a/src/geoptimiser.c +++ b/src/geoptimiser.c @@ -59,7 +59,6 @@ #include "crystal.h" #include "image.h" #include "utils.h" -#include "render.h" #include "colscale.h" struct imagefeature; @@ -157,6 +156,49 @@ struct gpanel }; +static GdkPixbuf *render_get_colour_scale(size_t w, size_t h, int scale) +{ + guchar *data; + size_t x, y; + int max; + + data = malloc(3*w*h); + if ( data == NULL ) return NULL; + + max = h-(h/6); + + for ( y=0; y