[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 00767] hack example: use convert



If you have a slightly broken pnmtopng binary,
you might be interested in how to use convert from 
the ImageMagic package to create pngs.

The attached example patch shows a workaround on how you can do this.
It should be quite easy to also support other image formats convert 
know of, though this is not really elegant.

If the conversion and rescaling programs could be specified it would
also reduce the security hole.

Bernhard
ps.: Send relevant replies to me as I am not on this list.

-- 
Professional Service around Free Software                (intevation.net)  
The FreeGIS Project                                         (freegis.org)
Association for a Free Informational Infrastructure            (ffii.org)
FSF Europe                                            	  (fsfeurope.org)
--- magicpoint-1.08a/mgp.c	Mon Dec 31 01:16:47 2001
+++ magicpoint-1.08a/mgp.c.new	Mon Dec 31 00:55:07 2001
@@ -442,7 +442,7 @@
 	int result=0;
 	char *childdebug;
 	char *(convdb[][3]) = {{ "jpg", "cjpeg", "djpeg" },
-				{ "png", "pnmtopng", "pngtopnm" },
+				{ "png", "convert - png:- ", "convert - pnm:- <" },
 				{ NULL, NULL, NULL }};
 	int inum = 0;
 

Attachment: pgp5Ml8Lb5Zzw.pgp
Description: PGP signature