Bitmap/Write a PPM file: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 38: Line 38:
=={{header|C}}==
=={{header|C}}==


<C>#include <stdio.h>
<lang c>#include <stdio.h>


void output_ppm(FILE *fd, image img)
void output_ppm(FILE *fd, image img)
Line 47: Line 47:
fwrite(img->buf, sizeof(pixel), n, fd);
fwrite(img->buf, sizeof(pixel), n, fd);
fflush(fd);
fflush(fd);
}</C>
}</lang>


=={{header|Forth}}==
=={{header|Forth}}==