Bitmap/Read an image through a pipe: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Perl 6}}: Add perl 6 example) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: slightly more idiomatic) |
||
Line 188: | Line 188: | ||
$b.data = $proc.out.slurp.ords.rotor(3).map: |
$b.data = $proc.out.slurp.ords.rotor(3).map: |
||
{ Pixel.new(R => |
{ Pixel.new(R => .[0], G => .[1], B => .[2]) }; |
||
'./camelia.ppm'.IO.open(:bin, :w).write: $b.P6;</lang> |
'./camelia.ppm'.IO.open(:bin, :w).write: $b.P6;</lang> |
||
See [https://github.com/thundergnat/rc/blob/master/img/camelia.png camelia image here]. |
See [https://github.com/thundergnat/rc/blob/master/img/camelia.png camelia image here]. |
||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |