Anonymous user
Bitmap/Read an image through a pipe: Difference between revisions
no edit summary
m (→{{header|C}}: lazyness of the others is not a meter to request improvements; dependencies are like the salt; afaik there's no need of being short and self contained) |
No edit summary |
||
Line 159:
=={{header|PicoLisp}}==
<lang PicoLisp>(setq *Ppm (ppmRead '("convert" "img.jpg" "ppm:-")))</lang>
=={{header|Racket}}==
<lang racket>
(define (image->bmp filename)
(define command (format "convert ~a ppm:-" filename))
(match-define (list in out pid err ctrl) (process command))
(define bmp (read-ppm in))
(close-input-port in)
(close-output-port out)
bmp)
(image->bmp "input.jpg")</lang>
=={{header|Ruby}}==
|