Bitmap/Read an image through a pipe: Difference between revisions

(→‎{{header|Tcl}}: More modern magick!)
Line 9:
Here I've used '''convert''' by ImageMagick. It is up to the program to ''understand'' the source file type; in this way, we can read theoretically any image format ImageMagick can handle. The <tt>get_ppm</tt> function defined in [[Read ppm file]] is used.
 
<lang c>image read_image(const char *name);</lang>
 
<lang c>#include "imglib.h"
Line 16:
#define MAXFILENAMELEN 256
#define MAXFULLCMDBUF MAXCMDBUF+MAXFILENAMELEN
image read_image(const char *name)
{
FILE *pipe;
Anonymous user