Bitmap/PPM conversion through a pipe: Difference between revisions

Added Mathematica
(→‎{{header|Tcl}}: Added zkl)
(Added Mathematica)
Line 108:
}
}</lang>
 
=={{header|Mathematica}}==
{{untested|Mathematica}}
<lang Mathematica>convert[img_, out_] :=
Module[{pipe =
StartProcess[{"WolframKernel", "-noinit", "-noprompt", "-run",
"Export[\"out.jpg\",ImportString[InputString[],\"PPM\"]]"}]},
WriteString[pipe, ExportString[Image[Graphics[]], "PPM"]];
Close[pipe];];</lang>
 
== {{Header|OCaml}} ==