RosettaCodeData/Task/Bitmap-Write-a-PPM-file/ATS/bitmap-write-a-ppm-file-1.ats

23 lines
572 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
#define ATS_PACKNAME "Rosetta_Code.bitmap_write_ppm_task"
staload "bitmap_task.sats"
(* Only pixmaps with positive width and height (pixmap1) are accepted
for writing a PPM. *)
fn {a : t@ype}
pixmap_write_ppm_raw_or_plain
(outf : FILEref,
pix : !pixmap1 a,
plain : bool)
: bool (* success *)
fn {a : t@ype}
pixmap_write_ppm_raw
(outf : FILEref,
pix : !pixmap1 a)
: bool (* success *)
overload pixmap_write_ppm with pixmap_write_ppm_raw_or_plain
overload pixmap_write_ppm with pixmap_write_ppm_raw