Log In  

Hello all!

Just grabbed Picotron in the last few days and have been experimenting with it - what a fun environment and vibe the community is putting forth as we all explore!

The main thing I am currently wondering about is if anyone has been able to discover a way to read arbitray files, either as strings or as binary? I know there's a fetch function that can be used to fetch data from urls or some types of files (text, pngs, etc). What I am not seeing is a way to read files as binary or otherwise non-explicitly supported file types?

The project I was working on was an image viewer that could pull in images from external urls, but they often come in a format that is not exactly what Picotron likes to use, so I was expecting to have to do some parsing of the files themselves - but that doesn't seem possible if I'm unable to look at a file as a blob of data.

I am perhaps just missing a built-in or some other obvious option here, but I'd love to hear from you all if you have any ideas here!

Thank you!

P#144312 2024-03-24 18:31

I believe that fetch just stores the contents of a file in a string (pretty sure it's the same thing you'd see if you just opened any given file up in notepad) you most definitely will have to do a lot of parsing to display images because of compression, but if you're unfamiliar with image parsing, I think the easiest image format to try first would be a bmp because they're uncompressed. I haven't done any image parsing myself so I'm afraid I can't offer any more help than this

P#144314 2024-03-24 18:58 ( Edited 2024-03-24 18:59)

[Please log in to post a comment]