summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-09-09 11:50:13 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-09-09 11:50:13 +0000
commit5c384712b70ad20595aafa9c95bc75628121c456 (patch)
treed685c6ac991f4453f1a2baab51988d58aedfb429
parenta6a705618faf74abb723a8ae57bd60d39e71f8b2 (diff)
parentbe7b1b482902a70ecebaf78ee7a534cf93eaeec0 (diff)
downloadpango-5c384712b70ad20595aafa9c95bc75628121c456.tar.gz
Merge branch 'use-gm' into 'main'
Switch to use GraphicsMagick in pango-view See merge request GNOME/pango!472
-rw-r--r--utils/viewer-main.c12
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);