[gthumb] removed unused code
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] removed unused code
- Date: Sun, 19 Aug 2012 08:38:36 +0000 (UTC)
commit d0091a6569707c5ca79cfceaa7642b4cf9b1a1c6
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Aug 19 09:34:00 2012 +0200
removed unused code
extensions/cairo_io/gth-image-saver-tga.c | 4 --
gthumb/gth-histogram.c | 66 -----------------------------
gthumb/gth-histogram.h | 2 -
3 files changed, 0 insertions(+), 72 deletions(-)
---
diff --git a/extensions/cairo_io/gth-image-saver-tga.c b/extensions/cairo_io/gth-image-saver-tga.c
index 8261d15..4ae4eef 100644
--- a/extensions/cairo_io/gth-image-saver-tga.c
+++ b/extensions/cairo_io/gth-image-saver-tga.c
@@ -294,15 +294,12 @@ gth_image_saver_tga_save_image (GthImageSaver *base,
GError **error)
{
GthImageSaverTga *self = GTH_IMAGE_SAVER_TGA (base);
- char *pixbuf_type;
char **option_keys;
char **option_values;
int i = -1;
cairo_surface_t *surface;
gboolean result;
- pixbuf_type = _gdk_pixbuf_get_type_from_mime_type (mime_type);
-
option_keys = g_malloc (sizeof (char *) * 2);
option_values = g_malloc (sizeof (char *) * 2);
@@ -325,7 +322,6 @@ gth_image_saver_tga_save_image (GthImageSaver *base,
cairo_surface_destroy (surface);
g_strfreev (option_keys);
g_strfreev (option_values);
- g_free (pixbuf_type);
return result;
}
diff --git a/gthumb/gth-histogram.c b/gthumb/gth-histogram.c
index bbe5bea..30c50b8 100644
--- a/gthumb/gth-histogram.c
+++ b/gthumb/gth-histogram.c
@@ -126,72 +126,6 @@ gth_histogram_changed (GthHistogram *self)
void
-gth_histogram_calculate_for_pixbuf (GthHistogram *self,
- const GdkPixbuf *pixbuf)
-{
- int **values;
- int *values_max;
- int width, height, n_channels;
- int rowstride;
- guchar *line, *pixel;
- int i, j, max;
-
- g_return_if_fail (GTH_IS_HISTOGRAM (self));
-
- values = self->priv->values;
- values_max = self->priv->values_max;
-
- if (pixbuf == NULL) {
- self->priv->n_channels = 0;
- histogram_reset_values (self);
- gth_histogram_changed (self);
- return;
- }
-
- n_channels = gdk_pixbuf_get_n_channels (pixbuf);
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
- line = gdk_pixbuf_get_pixels (pixbuf);
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
-
- self->priv->n_channels = n_channels + 1;
- histogram_reset_values (self);
-
- for (i = 0; i < height; i++) {
- pixel = line;
-
- for (j = 0; j < width; j++) {
- /* count values for each RGB channel */
- values[1][pixel[CAIRO_RED]] += 1;
- values[2][pixel[CAIRO_GREEN]] += 1;
- values[3][pixel[CAIRO_BLUE]] += 1;
- if (n_channels > 3)
- values[4][ pixel[CAIRO_ALPHA] ] += 1;
-
- /* count value for Value channel */
- max = MAX (pixel[CAIRO_RED], pixel[CAIRO_GREEN]);
- max = MAX (pixel[CAIRO_BLUE], max);
- values[0][max] += 1;
-
- /* track max value for each channel */
- values_max[0] = MAX (values_max[0], values[0][max]);
- values_max[1] = MAX (values_max[1], values[1][pixel[0]]);
- values_max[2] = MAX (values_max[2], values[2][pixel[1]]);
- values_max[3] = MAX (values_max[3], values[3][pixel[2]]);
- if (n_channels > 3)
- values_max[4] = MAX (values_max[4], values[4][pixel[CAIRO_ALPHA]]);
-
- pixel += n_channels;
- }
-
- line += rowstride;
- }
-
- gth_histogram_changed (self);
-}
-
-
-void
gth_histogram_calculate_for_image (GthHistogram *self,
cairo_surface_t *image)
{
diff --git a/gthumb/gth-histogram.h b/gthumb/gth-histogram.h
index 77ea5e5..7155bcf 100644
--- a/gthumb/gth-histogram.h
+++ b/gthumb/gth-histogram.h
@@ -66,8 +66,6 @@ GType gth_histogram_get_type (void) G_GNUC_CONST;
GthHistogram * gth_histogram_new (void);
void gth_histogram_calculate_for_image (GthHistogram *self,
cairo_surface_t *image);
-void gth_histogram_calculate_for_pixbuf (GthHistogram *self,
- const GdkPixbuf *pixbuf);
double gth_histogram_get_count (GthHistogram *self,
int start,
int end);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]