about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-05-05 19:51:17 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-05-05 19:51:17 +0000
commit1bcdf21d91af4855b23dc7a9b8d15520503dffed (patch)
treee30302629e634651e32c842b56f5f73967ffe9d3 /converter
parenta660613f86d10eeba1cb1232c29ab056e782d8f0 (diff)
downloadnetpbm-mirror-1bcdf21d91af4855b23dc7a9b8d15520503dffed.tar.gz
netpbm-mirror-1bcdf21d91af4855b23dc7a9b8d15520503dffed.tar.xz
netpbm-mirror-1bcdf21d91af4855b23dc7a9b8d15520503dffed.zip
cleanup - don't use shell to run Pnmtopng
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2754 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/other/pamtowinicon.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/converter/other/pamtowinicon.c b/converter/other/pamtowinicon.c
index 7e2c9e86..3d77d731 100644
--- a/converter/other/pamtowinicon.c
+++ b/converter/other/pamtowinicon.c
@@ -643,7 +643,7 @@ writePng(const struct pam * const pamP,
     
     if (haveAlpha || haveAnd) {
         const char * alphaFileName;
-        const char * command;
+        const char * alphaOpt;
 
         if (haveAlpha)
             makeAlphaFile(pamP, tuples, alphaPlane, &alphaFileName);
@@ -653,19 +653,19 @@ writePng(const struct pam * const pamP,
         strcpy (pam.tuple_type,
                 pam.depth == 3 ? PAM_PPM_TUPLETYPE: PAM_PGM_TUPLETYPE);
         
-        pm_asprintf(&command, "pnmtopng -alpha=\"%s\"", alphaFileName);
+        pm_asprintf(&alphaOpt, "-alpha=%s", alphaFileName);
 
-        pm_system(pm_feed_from_pamtuples, &pamTuples,
-                  acceptToFile, &acceptParm,
-                  command);
+        pm_system_lp("pnmtopng", pm_feed_from_pamtuples, &pamTuples,
+                     acceptToFile, &acceptParm,
+                     "pnmtopng", alphaOpt, NULL);
     
-        pm_strfree(command);
+        pm_strfree(alphaOpt);
     
         unlink(alphaFileName);
     } else {
-        pm_system(pm_feed_from_pamtuples, &pamTuples,
-                  acceptToFile, &acceptParm,
-                  "pnmtopng");
+        pm_system_lp("pnmtopng", pm_feed_from_pamtuples, &pamTuples,
+                     acceptToFile, &acceptParm,
+                     "pnmtopng", NULL);
     }
 
     *sizeP = pngSize;