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-video-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-video-thumbnailer.c')
-rw-r--r-- | src/totem-video-thumbnailer.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c index fa80f991f..a8dbb95d7 100644 --- a/src/totem-video-thumbnailer.c +++ b/src/totem-video-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; @@ -524,6 +523,7 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, const char *video_path, int size, gboolean is_still) { int width, height; + char *a_width, *a_height; GdkPixbuf *with_holes; GError *err = NULL; gboolean ret; @@ -540,20 +540,13 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, else with_holes = scale_pixbuf (pixbuf, size, is_still); + a_width = g_strdup_printf ("%d", width); + a_height = g_strdup_printf ("%d", height); - 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, "png", &err, + "tEXt::Thumb::Image::Width", a_width, + "tEXt::Thumb::Image::Height", a_height, + NULL); if (ret == FALSE) { if (err != NULL) { @@ -882,7 +875,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 }, |