produces an output image which is different from the input image.
Looking at the RBG values in lisp (SBCL) and python I get different values.
(let ((img (read-jpeg-file "/tmp/cat.jpg")))
(loop for x below (array-dimension img 1)
minimize (aref img 100 x 1) into low
maximize (aref img 100 x 1) into high
finally (return (list low high))))
gives (132 255)
import numpy as np
from PIL import Image
image = np.array(Image.open("/tmp/cat.jpg"))
arr = image[100,:,1]
print(np.min(arr), np.max(arr))
Quicklisp:
opticl-20211230-git
(Thanks to #14 for the hint of what I'm seeing)
There appears to be a bug in the read-jpeg code
produces an output image which is different from the input image.
Looking at the RBG values in lisp (SBCL) and python I get different values.
gives
(132 255)
gives
(133 255)
i.e. minimum value is
132
or133
.An example JPEG: Obligatory cat image