Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BSAVE BMPs, lillo?
#11
This is simple enough for fans to add. You don't need lillo to, just grab it and add it yourself.

Wotsit.org has everything you need on the format.
Reply
#12
Code:
Syntax: BSAVE "filename.bmp", VARPTR(sprite(0)), length [, BMP]
1. saves in BLOAD/BMP format depending on if you specify the BMP word
2. To save as a bitmap, sprite() MUST be a GET/PUT format sprite so that BSAVE can extract the width/height
Sort of like LINEs B|BF


Ok, to everyone who is just going to say "it's easy to code, do it yourself":
I know it's easy, I am doing it myself and I have for a long time now.
Thats not the point.
It's just a nice addon as we already have BMP loading, why not saving? They sort of complement each other.

I thought about it when making my own BMP save routine actually..
Reply
#13
That's what I mean. While lillo probably won't do it on his own, he might put it in the main build if you add it yourself, and this is something simple enough, unlike, say, compiler features.
Reply
#14
yeah interesting idea, though loading would be inherantly more popular than saving of bmp's. Its probably another ~1-2kb of bloat in the exe so thats not too bad.

Of course png's are better than bmp by far but adding in the standard gfx lib would be silly imo.
Reply
#15
There's already BMP loading Nex..

BLOAD "bmpfile", @array(0)
Reply
#16
err what i ment was, bmp loading is much more important to have than saving, thus why its already supported.
Reply
#17
Ok, since it seems people like the idea, and it's not a big task neither it adds much bloat, I just added BMP saving support to BSAVE.

It can save BMPs by just specifying the .bmp extension in the filename; if the target address is 0, the current screen work page is saved, otherwise it expects address to point to a properly set up GET/PUT buffer.
So:
Code:
BSAVE "image.bmp", 0
will save the whole screen contents to image.bmp...
ngelo Mottola - EC++
Reply
#18
Great work, Lillo Smile
Reply
#19
Quote:err what i ment was, bmp loading is much more important to have than saving, thus why its already supported.
Ah, sorry, my bad..


And thanks lillo ^_^..
Reply
#20
Thank you lillo, much appreciated.
gunder
"I have a perfect body, but it's in the trunk and starting to smell."
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)