aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-08 15:53:17 +0100
committerThomas White <taw@physics.org>2010-01-08 15:53:17 +0100
commitbd26d5745269594647ec79f64fdfb8e750891672 (patch)
tree29968c2c0872fe0d52c5078426c3a89f1e8ed6ec /src/render.c
parenta374cdb2396659d711f85851cb0904ccf7c9731d (diff)
Zaefferer gradient search
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/render.c b/src/render.c
index 4de441f3..ce44610c 100644
--- a/src/render.c
+++ b/src/render.c
@@ -89,6 +89,31 @@ static void render_free_data(guchar *data, gpointer p)
free(data);
}
+
+static void show_marked_features(struct image *image, guchar *data,
+ int w, int h, int binning)
+{
+ int i;
+
+ if ( image->features == NULL ) return;
+
+ for ( i=0; i<image_feature_count(image->features); i++ ) {
+
+ struct imagefeature *f;
+ int x, y;
+
+ f = image_get_feature(image->features, i);
+
+ x = f->x; y = f->y;
+
+ x /= binning;
+ y /= binning;
+
+ data[3*( x+w*(h-1-y) )+0] = 255;
+ }
+}
+
+
/* Return a pixbuf containing a rendered version of the image after binning.
* This pixbuf might be scaled later - hopefully mostly in a downward
* direction. */
@@ -144,6 +169,8 @@ GdkPixbuf *render_get_image(struct hdfile *hdfile, int binning, int boostint,
}
}
+ show_marked_features(hdfile_get_image(hdfile), data, w, h, binning);
+
/* Finished with this */
free(hdr);