Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:50 16 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : IMAGE LOAD/SAVE extension

Author Message
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 08:01am 18 Nov 2020
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4147
Posted: 09:27am 18 Nov 2020
Copy link to clipboard 
Print this post

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 Republic
Posts: 533
Posted: 09:30am 18 Nov 2020
Copy link to clipboard 
Print this post

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 Republic
Posts: 533
Posted: 09:33am 18 Nov 2020
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4147
Posted: 10:08am 18 Nov 2020
Copy link to clipboard 
Print this post

  jirsoft said  Because of speed.

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 Republic
Posts: 533
Posted: 10:38am 18 Nov 2020
Copy link to clipboard 
Print this post

  JohnS said  
  jirsoft said  Because of speed.

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

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 Kingdom
Posts: 10588
Posted: 10:54am 18 Nov 2020
Copy link to clipboard 
Print this post

  Quote  could be LOAD BMP/PNG... be extended for LOAD RAW file$, address


You can already do this using input$() and longstrings
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 11:02am 18 Nov 2020
Copy link to clipboard 
Print this post

OK, thanks.
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
johnd
Newbie

Joined: 22/10/2020
Location: United States
Posts: 30
Posted: 02:23pm 18 Nov 2020
Copy link to clipboard 
Print this post

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 Republic
Posts: 533
Posted: 05:23pm 18 Nov 2020
Copy link to clipboard 
Print this post

Yes, the LOAD can be solved this way, but with SAVE it's worse...
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025