|
Forum Index : Microcontroller and PC projects : IMAGE LOAD/SAVE extension
| Author | Message | ||||
| jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi Peter, could be LOAD BMP/PNG... be extended for LOAD RAW file$, address , where will be raw binary data loaded? And the same for SAVE RAW file$, address, length? Also page numbers parameter for standard SAVE and LOAD will be nice LOAD BMP x, y[,page] and SAVE IMAGE file$[,x,y,w,h,page]... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4147 |
For the LOAD, why not just open & read the file? And for SAVE, open & write file? John |
||||
| jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Because of speed. It's faster LOAD and SAVE chunk of memory in one big block then character access... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
| jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
And why the page parameter? I have now stored part of screen and need to save it as image, but to do it, I need to move it to PAGE 0 (and disturb current display), save it and return back... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4147 |
How much faster? The SD card is slow whether from C or Basic. I'm wondering why you want to use Peter's precious time this way! John |
||||
| jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
It was just an idea, because it can be used many different ways and because already saving is there and command can be extended and make it sense. I have no problem, when Peter says NO. Right now I'm doing it with OPEN/PRINT#/CLOSE, but it's no optimal. Anyway can be written CSUB for it. Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10588 |
You can already do this using input$() and longstrings |
||||
| jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
OK, thanks. Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
| johnd Newbie Joined: 22/10/2020 Location: United StatesPosts: 30 |
Question: If you do this: PAGE WRITE 1 LOAD PNG "pic.png" (or something to that effect) Does it NOT load into page 1? I thought it would have. It would seem strange to have to load Sprite/Bitmap sheets always onto the display page (0) and copy them into another page. Then load the next one. Or maybe there is another way of doing that -- I'm still becoming familiar with the manual and all of the commands. I don't mind specifying the page write first, but if load always goes to page 0, then I would also support a "page" parameter on the load command. |
||||
| jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Yes, the LOAD can be solved this way, but with SAVE it's worse... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |