Home | Reviews | GUIpedia | Forum | Fun500
Brandon | QBASIC Image LoaderI have been looking for a good image loader, and the ones I find are SVGA or load the image to the top left corner. Does anyone have a good routine to display a BMP,PNG,JPEG,TIFF,GIF, or any other GIMP supported image format to an (X,Y) coordinate in Screen 12? | 2009-03-08 | 9:29 AM |
MPNQB | Re:QBASIC Image LoaderThere was a trick I used in EnSpireMe 0.2.0 and 0.3.0 to coax those BMP loaders into loading it anywhere you want instead of the top left corner. I think it was pretty simple: remap the viewport while you draw the BMP (e.g. make 0,0 the x,y coordinate of the bitmap) then un-map the viewport (basically put 0,0 back to the real 0,0.) Easy and it works.
There also is the issue of paletting. Ensure you have a decent image program that can re-map the palette of a BMP to the standard DOS one instead of the Windows one. That way you don't have to re-learn the numbers for the colors. As a bonus, you can dither while you're converting it for the palette. I use Ulead Photo Impact for this. | 2009-03-08 | 10:46 AM |
Brandon | Re:QBASIC Image LoaderI actually just added a function to LOAD640 from enspireme, It adds cx% to the pset X and cy% to the pset y, so the image is drawn at (CX%,CY%)
Maybe I'll have a demo later :) | 2009-03-08 | 11:23 AM |
BASIC Programming Help
2021 Brandon Cornell