Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -8,11 +8,11 @@ blobsize = INSTR(FILEGET, "\n255\n") + 4 ' Get sizeof PPM header
|
|||
head = @FILEGET + blobsize: tail = @FILEGET + FILELEN ' Set loop bounds
|
||||
|
||||
FOR ptr = head TO tail STEP 3 ' Transform color triplets
|
||||
r = PEEK(ptr + 0, 1) ' Read colors stored in RGB order
|
||||
g = PEEK(ptr + 1, 1)
|
||||
b = PEEK(ptr + 2, 1)
|
||||
l = 0.2126 * r + 0.7152 * g + 0.0722 * b ' Derive luminance
|
||||
POKE(ptr + 0, CHR(l))(ptr + 1, CHR)(ptr + 2, CHR) ' Write grayscale
|
||||
r = PEEK(ptr + 0, 1) ' Read colors stored in RGB order
|
||||
g = PEEK(ptr + 1, 1)
|
||||
b = PEEK(ptr + 2, 1)
|
||||
l = 0.2126 * r + 0.7152 * g + 0.0722 * b ' Derive luminance
|
||||
POKE(ptr + 0, CHR(l))(ptr + 1, CHR)(ptr + 2, CHR) ' Write grayscale
|
||||
NEXT
|
||||
|
||||
FILEPUT(FILEOPEN(grayscale, BINARY_NEW), FILEGET): FILECLOSE(FILEOPEN) ' Save buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue