'this program is a multi-color palette genrator that writes all RGB-color 'combinations into a datafile that can be viewed as an RAW RGB image 'copyright Dioxaz (c) 2003. email : dsx1980@chez.com. Website : http://www.chez.com/dsx1980 CLS DIM r AS INTEGER 'variable for red DIM g AS INTEGER 'variable for green DIM b AS INTEGER 'variable for blue INPUT "enter path + filename :"; f$ OPEN f$ FOR BINARY AS #3 'open mentionned output file below as a binary file p = 1 'variable for offset in output file FOR r = 0 TO 255 STEP 8 'change step values to 16 to get a 4096-color RAW image FOR g = 0 TO 255 STEP 8 'and change step values to 32 to get a 512-color RAW image FOR b = 0 TO 255 STEP 8 LOCATE 1, 1: PRINT r 'display current RGB values, added for testing LOCATE 2, 1: PRINT g LOCATE 3, 1: PRINT b PUT #3, p, r 'writes the RGB value at offset specified p = p + 1 'forces the program not to write 16-bit integers PUT #3, p, g p = p + 1 PUT #3, p, b p = p + 1 NEXT NEXT NEXT CLOSE 'closes the output file when done 'note : the datafile generated by this program is has some size problem (due to 'built-in Qbasic 16-bit integer handling), so you'll have to open it in an 'hexeditor and cut some useless bytes at the end. Please take note of this. 'Also, don't forget to rename the file to 'yourpalette'.raw in order to view it 'using an image editor. Select an appropiate resolution and a RGB format (RGB order) 'to open the file, and you'll be able to view the palette or test image (call that 'what you want :p) correctly.