diff options
author | Peng Wu <pwu@redhat.com> | 2021-09-09 12:01:17 +0800 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-09-11 08:37:11 -0400 |
commit | 722c8e0fc0b78d0f77501d2aa8064d3c8d678c43 (patch) | |
tree | 9c8f95df83f042cbed892183bdcbfc36a9864139 | |
parent | 8011082ecdba71cd3b4372ca0af032b95426770b (diff) | |
download | pango-722c8e0fc0b78d0f77501d2aa8064d3c8d678c43.tar.gz |
Switch to use GraphicsMagick in pango-view
-rw-r--r-- | utils/viewer-main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/viewer-main.c b/utils/viewer-main.c index 537a012d..293ce1b4 100644 --- a/utils/viewer-main.c +++ b/utils/viewer-main.c @@ -84,10 +84,10 @@ main (int argc, else { int fd; - const gchar *convert_argv[4] = {"convert", "-", "%s"}; + const gchar *convert_argv[5] = {"gm", "convert", "-", "%s"}; GError *error; - convert_argv[2] = opt_output; + convert_argv[3] = opt_output; if (!g_spawn_async_with_pipes (NULL, (gchar **)(void*)convert_argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | @@ -95,7 +95,7 @@ main (int argc, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &pid, &fd, NULL, NULL, &error)) - fail ("When running ImageMagick 'convert' command: %s\n", error->message); + fail ("When running GraphicsMagick 'gm convert' command: %s\n", error->message); stream = fdopen (fd, "wb"); } view->write (instance, surface, stream, width, height); @@ -144,13 +144,13 @@ no_display: { int fd; FILE *stream; - const gchar *display_argv[5] = {"display", "-title", "%s", "-"}; + const gchar *display_argv[6] = {"gm", "display", "-title", "%s", "-"}; GError *error = NULL; GPid pid; if (!view->write) fail ("%s viewer backend does not support displaying or writing", view->name); - display_argv[2] = title; + display_argv[3] = title; if (!g_spawn_async_with_pipes (NULL, (gchar **)(void*)display_argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | @@ -158,7 +158,7 @@ no_display: G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &pid, &fd, NULL, NULL, &error)) - fail ("When running ImageMagick 'display' command: %s\n", error->message); + fail ("When running GraphicsMagick 'gm display' command: %s\n", error->message); stream = fdopen (fd, "wb"); view->write (instance, surface, stream, width, height); fclose (stream); |