Page 1 of 1

convert graphic screen to e.g. JPG file

Posted: Thu Sep 21, 2006 2:54 pm
by merallas
I have written a couple of programs in qbasic that can solve and generate new sudokus. At the moment the output is a 9x9 digit .txt file (without grid), where zero's represent empty places. However, it would be nice if a complete sudoku could be generated which can be inserted in a word file. To generate a grid with figures in the graphic mode is no problem; but how to convert the graphic screen to a JPG or something like that without repeating handwork.

Posted: Thu Sep 21, 2006 3:52 pm
by Patz QuickBASIC Creations
I made a Sudoku program for the TI-83 Plus calculators. I could make one in QuickBASIC, but it's not going to have graphics, just ASCII art.

Posted: Fri Sep 22, 2006 6:48 am
by Dr_D
It would be alot easier to save a bitmap. There are tons of those floating around for QB. Unless, you need to save it for the web?

Posted: Fri Sep 22, 2006 10:01 am
by merallas
Dr_D wrote:It would be alot easier to save a bitmap. There are tons of those floating around for QB. Unless, you need to save it for the web?
Thanks for your reply.
I think that bitmap is good enough for this application. Can you supply a site with examples. I found several information about reading files, but no generation.

Regards,
Henderikus

Posted: Fri Sep 22, 2006 5:40 pm
by Dr_D
Well, I don't know of any, right off the top of my head. Compared to other things, it's really not hard at all. You could start by trying to reverse one of the loaders. ;)

Posted: Sun Sep 24, 2006 10:35 pm
by Nodtveidt
I had a program at one point in time that could convert an SBS file (Super BSave) to a GIF image. Unfortunately, I lost the sourcecode long ago and I can't find the program at the moment but I'll see if I can dig it up. All you have to do is add a small portion of code to your program to capture an SBS file, then run that file through the converter to get a noninterlaced GIF87a image. I'll see if I can find them both, they're probably in my old QB-based WOS game.

Posted: Mon Sep 25, 2006 2:30 am
by merallas
Nekrophidius wrote:I had a program at one point in time that could convert an SBS file (Super BSave) to a GIF image. Unfortunately, I lost the sourcecode long ago and I can't find the program at the moment but I'll see if I can dig it up. All you have to do is add a small portion of code to your program to capture an SBS file, then run that file through the converter to get a noninterlaced GIF87a image. I'll see if I can find them both, they're probably in my old QB-based WOS game.
Sounds promissing, I will wait

Regards,
Henderikus

Posted: Sun Oct 01, 2006 7:46 am
by Nodtveidt
Sorry about the late response, it's been a busy week. Anyways, here ya go:

http://www.nodtveidt.net/sbs2gif.zip

It includes the sbs2gif converter with its documentation, plus some sourcecode to save an SBS file. Note that it only works in SCREEN 13 so if you're using a different screenmode, this won't help you much.

Oh...also, the documentation is slightly wrong. Drag-and-drop doesn't seem to work for this tool, you have to use it from the commandline and cannot include the extension. So if you have a file such as:

SMPL0001.SBS

you would type:

sbs2gif smpl0001

without the extension. Seems I was a poor coder back then. :oops:

Posted: Mon Oct 02, 2006 4:52 am
by merallas
Nekrophidius wrote:Sorry about the late response, it's been a busy week. Anyways, here ya go:

http://www.nodtveidt.net/sbs2gif.zip

It includes the sbs2gif converter with its documentation, plus some sourcecode to save an SBS file. Note that it only works in SCREEN 13 so if you're using a different screenmode, this won't help you much.

Oh...also, the documentation is slightly wrong. Drag-and-drop doesn't seem to work for this tool, you have to use it from the commandline and cannot include the extension. So if you have a file such as:

SMPL0001.SBS

you would type:

sbs2gif smpl0001

without the extension. Seems I was a poor coder back then. :oops:

Thank you very much for supplying this code. Now I will do my best to make it operational at my computer.

Thanks,
Merallas