BBC BASIC for Windows
« how do I load and save a bmp image? »
Welcome Guest. Please Login or Register. Apr 5th, 2018, 10:12pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
how do I load and save a bmp image?
« Thread started on: Apr 21st, 2016, 03:49am »
In order to make my next app.. BMPTOCODE for BBC Basic I need to know how to load a bmp image (255) color BMP and then I can read the information and compress it so small that it only occupies a few lines of code. Can I get assistance with this?
Logged
I like making program generators and like reinventing the wheel
Re: how do I load and save a bmp image?
« Reply #1 on: Apr 21st, 2016, 08:09am »
Hi Michael,
You can use *LOAD to load a file into memory: you'll need to reserve space first using DIM.
Since it's a bitmap, you might consider making a DIBSection for the screen, as has been used in several recent posts, and then using *DISPLAY to load the bitmap into it: that way you'd automatically get a pointer to the start of the image data.
I'm looking forward to seeing how you compress the image data into a program!
Re: how do I load and save a bmp image?
« Reply #3 on: Apr 21st, 2016, 3:07pm »
Thanks a lot. I do have a few products of BMPTOCODE in forums. One is the Message box exclamation point called "Looks like you have an error Notice Box" and "A sky full of rating stars" Keep in mind that BMPTOCODE is meant for making images no larger than 100x100 and the image must not be too complex. (also the image MUST be the same width and height and you can only use the colors in paint that I specify)
(more complexity)= larger code
But that is from the modified version and would require mostly a rebuild or BMPTOCODE (except for the compression technique)