[pango/pango-1-48] Switch to use GraphicsMagick in pango-view
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango-1-48] Switch to use GraphicsMagick in pango-view
- Date: Sat, 11 Sep 2021 12:48:10 +0000 (UTC)
commit 722c8e0fc0b78d0f77501d2aa8064d3c8d678c43
Author: Peng Wu <pwu redhat com>
Date: Thu Sep 9 12:01:17 2021 +0800
Switch to use GraphicsMagick in pango-view
utils/viewer-main.c | 12 ++++++------
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]