diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-07-25 12:52:05 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-07-25 13:37:16 +0200 |
commit | a57e11867bb873137c5ee5b882d05581d6b13c69 (patch) | |
tree | 2c5cff00674c161aa659508be42be80c3c3d4637 /src/totem-gallery-thumbnailer.c | |
parent | a642fd97109c1802b9532924a12731677aabe65e (diff) | |
download | totem-a57e11867bb873137c5ee5b882d05581d6b13c69.tar.gz |
thumbnailer: Remove JPEG output option
It's always false for the video thumbnailer, always true for the gallery
maker.
Diffstat (limited to 'src/totem-gallery-thumbnailer.c')
-rw-r--r-- | src/totem-gallery-thumbnailer.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/totem-gallery-thumbnailer.c b/src/totem-gallery-thumbnailer.c index fa80f991f..507781f52 100644 --- a/src/totem-gallery-thumbnailer.c +++ b/src/totem-gallery-thumbnailer.c @@ -68,7 +68,6 @@ #define GALLERY_HEADER_HEIGHT 66 /* header height (in pixels) for the gallery */ #define DEFAULT_OUTPUT_SIZE 256 -static gboolean jpeg_output = FALSE; static gboolean raw_output = FALSE; static int output_size = -1; static gboolean time_limit = TRUE; @@ -523,14 +522,10 @@ static void save_pixbuf (GdkPixbuf *pixbuf, const char *path, const char *video_path, int size, gboolean is_still) { - int width, height; GdkPixbuf *with_holes; GError *err = NULL; gboolean ret; - height = gdk_pixbuf_get_height (pixbuf); - width = gdk_pixbuf_get_width (pixbuf); - /* If we're outputting a gallery or a raw image without a size, * don't scale the pixbuf or add borders */ if (gallery != -1 || (raw_output != FALSE && size == -1)) @@ -541,19 +536,7 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, with_holes = scale_pixbuf (pixbuf, size, is_still); - if (jpeg_output == FALSE) { - char *a_width, *a_height; - - a_width = g_strdup_printf ("%d", width); - a_height = g_strdup_printf ("%d", height); - - ret = gdk_pixbuf_save (with_holes, path, "png", &err, - "tEXt::Thumb::Image::Width", a_width, - "tEXt::Thumb::Image::Height", a_height, - NULL); - } else { - ret = gdk_pixbuf_save (with_holes, path, "jpeg", &err, NULL); - } + ret = gdk_pixbuf_save (with_holes, path, "jpeg", &err, NULL); if (ret == FALSE) { if (err != NULL) { @@ -882,7 +865,6 @@ create_gallery (ThumbApp *app) } static const GOptionEntry entries[] = { - { "jpeg", 'j', 0, G_OPTION_ARG_NONE, &jpeg_output, "Output the thumbnail as a JPEG instead of PNG", NULL }, { "size", 's', 0, G_OPTION_ARG_INT, &output_size, "Size of the thumbnail in pixels (with --gallery sets the size of individual screenshots)", NULL }, { "raw", 'r', 0, G_OPTION_ARG_NONE, &raw_output, "Output the raw picture of the video without scaling or adding borders", NULL }, { "no-limit", 'l', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &time_limit, "Don't limit the thumbnailing time to 30 seconds", NULL }, |