Bitmap/Write a PPM file: Difference between revisions

Line 267:
=={{header|ATS}}==
For this code you will also need <code>bitmap_task.sats</code> and <code>bitmap_task.dats</code> from [[Bitmap#ATS]].
 
The static file provides templates for writing a PPM in either raw or plain format, regardless of what type you use to represent a pixel. The dynamic file, however, provides implementations ''only'' for the <code>rgb24</code> type defined in <code>bitmap_task.sats</code>.
 
''(An attentive reader might notice that this is not really an adequate design, because the ''<code>rgb24</code>'' type is indistinguishable from any other triple of uint8 values. Thus the template system will not do what we actually want it to do, once we introduce other pixel types. It is a subtle matter. Now that ''I'' have noticed this, I plan to address the issue and post new code.)''
 
===The ATS static file===
1,448

edits