Bitmap/Read a PPM file: Difference between revisions

Content added Content deleted
(Added FreeBASIC)
 
Line 10: Line 10:
{{trans|Python}}
{{trans|Python}}


<syntaxhighlight lang="11l">T Colour
<syntaxhighlight lang="11l">T Colour = BVec3
Byte r, g, b

F (r, g, b)
.r = r
.g = g
.b = b

F ==(other)
R .r == other.r & .g == other.g & .b == other.b


V black = Colour(0, 0, 0)
V black = Colour(0, 0, 0)
Line 121: Line 112:
4 4 4 0 0 0 0 0 0 0 0 0
4 4 4 0 0 0 0 0 0 0 0 0
</pre>
</pre>

=={{header|Action!}}==
=={{header|Action!}}==
Part of the task responsible for conversion from RGB color image into a grayscale image can be found in the module [http://www.rosettacode.org/wiki/Category:Action!_Bitmap_tools#RGB2GRAY.ACT RGB2GRAY.ACT]. File D:PPM6.PPM can be generated by task [http://www.rosettacode.org/wiki/Bitmap/Write_a_PPM_file#Action.21 Bitmap/Write a PPM file].
Part of the task responsible for conversion from RGB color image into a grayscale image can be found in the module [http://www.rosettacode.org/wiki/Category:Action!_Bitmap_tools#RGB2GRAY.ACT RGB2GRAY.ACT]. File D:PPM6.PPM can be generated by task [http://www.rosettacode.org/wiki/Bitmap/Write_a_PPM_file#Action.21 Bitmap/Write a PPM file].