Bitmap/Histogram: Difference between revisions

m
1-bit gray and save as PBM
m (lena -> lenna)
m (1-bit gray and save as PBM)
Line 286:
(median (find-median histogram))
(bw-image (with-image-bounds (height width) image
(make-81-bit-gray-image height width :initial-element 0))))
(do-pixels (i j) image
(setf (pixel bw-image i j) (if (<= (pixel image i j) median) 01 2550)))
bw-image))
 
Line 294:
(let* ((image (read-jpeg-file "lenna.jpg"))
(bw-image (gray->black&white-image (color->gray-image image))))
(write-pgmpbm-file "lenna-bw.pgmpbm" bw-image)))</lang>
 
=={{header|D}}==
68

edits