RosettaCodeData/Task/Bitmap-Read-an-image-through-a-pipe/Lua/bitmap-read-an-image-through-a-pipe-2.lua

6 lines
151 B
Lua
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
local bitmap = Bitmap(0,0)
fp = io.popen("magick Lenna100.jpg ppm:-", "rb")
bitmap:loadPPM(nil, fp)
bitmap:savePPM("Lenna100.ppm") -- just as "proof"