Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Grayscale-image/PL-I/grayscale-image.pli
Normal file
11
Task/Grayscale-image/PL-I/grayscale-image.pli
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
do j = 1 to hbound(image,1);
|
||||
do i = 0 to hbound(image,2);
|
||||
color = image(i,j);
|
||||
R = substr(color, 17, 8);
|
||||
G = substr(color, 9, 8);
|
||||
B = substr(color, 1, 8);
|
||||
grey = trunc(0.2126*R + 0.7152*G + 0.0722*B);
|
||||
greybits = grey;
|
||||
image(i,j) = substr(greybits, length(greybits)-7, 8);
|
||||
end;
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue