Bitmap/Histogram: Difference between revisions
m
→{{header|Perl 6}}: use correct file extension for portable bitmap
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: bleh. e before h) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: use correct file extension for portable bitmap) |
||
Line 966:
my @gray = grayscale($bmp);
my $threshold = @gray.sum / @gray;
for @gray.rotor($bmp.width)
my @row = $_.list;
@row.push(0) while @row % 8;
Line 979:
histogram($b);
'./Lenna-bw.
See [https://github.com/thundergnat/rc/blob/master/img/Lenna.png Lenna], and [https://github.com/thundergnat/rc/blob/master/img/Lenna-bw.png Lenna-bw] images. (converted to .png as .ppm format is not widely supported).
|