Re: Image processing, getting started?
Jun 20, 2019, 12:20 PM by gpor...@yahoo.com: > Hi! > > This is cool! > > Maybe you need to convert the images to PPM first? Or you can create or use > exisiting C library to get the right format you want :) > > Yeah, PPM is a simple format. But for now I will try working without converting 1st. Then perhaps, will look into libraries and conversion stuff. Thanks for the suggestion. JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Image processing, getting started?
Jun 20, 2019, 12:23 PM by a...@software-lab.de: > On Thu, Jun 20, 2019 at 08:46:13AM +0200, Alexander Burger wrote: > >> (in "file" >> (make >> (do (car (info "file")) >> (link (rd 1)) ) ) ) >> > Sorry, this is unnecessarily complex. > Right, but good to know there's a built in way to get file Meta data. > Better is > (in "file" > (make > (while (rd 1) > (link @) ) ) ) > Awesome, due to while (link @) works instead of needing (link (rd 1)). Thanks! I think I'm sufficiently covered to get started. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Image processing, getting started?
On Thu, Jun 20, 2019 at 08:46:13AM +0200, Alexander Burger wrote: >(in "file" > (make > (do (car (info "file")) > (link (rd 1)) ) ) ) Sorry, this is unnecessarily complex. Better is (in "file" (make (while (rd 1) (link @) ) ) ) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Image processing, getting started?
Hi! This is cool! Maybe you need to convert the images to PPM first? Or you can create or use exisiting C library to get the right format you want :) BR, geo > On Jun 20, 2019, at 3:24 PM, JmageK wrote: > > Hi, all! > I was recently thinking, 'How can you do image processing in picolisp' Like > reading a file, changing some color values, etc. > I tried a basic PNG & jpg file. Using rd it does read but I'm getting binary > output in terminal. And if I try it for a high value (when using jpg) pil > crashes > : (in"file.jpg"(do 9 (prinl (rd]or > : (in"file.jpg"(do 40(PR(rd]For now just knowing how to read the file > contents as an array of color values like if rgb then (255 23 123 23 1 0 44 > 65..) would be sufficient, but a better way is always welcome. I would be > testing with jpg or PNG. > JmageK > -- > Securely sent with Tutanota > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Image processing, getting started?
Hi JmageK, > I was recently thinking, 'How can you do image processing in picolisp' Like > reading a file, changing some color values, etc. > : (in"file.jpg"(do 9 (prinl (rd]or > : (in"file.jpg"(do 40(PR(rd]For now just knowing how to read the file > contents as an array of color values like if rgb then (255 23 123 23 1 0 44 > 65..) would be sufficient, but a better way is always welcome. I would be > testing with jpg or PNG. Just (rd) reads a full s-expression in PLIO format. Not suitable for raw data. To read a file byte-wise, try (rd 1) (in "file" (make (do (car (info "file")) (link (rd 1)) ) ) ) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Image processing, getting started?
Hi, all! I was recently thinking, 'How can you do image processing in picolisp' Like reading a file, changing some color values, etc. I tried a basic PNG & jpg file. Using rd it does read but I'm getting binary output in terminal. And if I try it for a high value (when using jpg) pil crashes : (in"file.jpg"(do 9 (prinl (rd]or : (in"file.jpg"(do 40(PR(rd]For now just knowing how to read the file contents as an array of color values like if rgb then (255 23 123 23 1 0 44 65..) would be sufficient, but a better way is always welcome. I would be testing with jpg or PNG. JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe