Skip to content

Instantly share code, notes, and snippets.

View elliot-treasure's full-sized avatar

Elliot Treasure elliot-treasure

View GitHub Profile
@alaingalvan
alaingalvan / read_bmp_ds_grid.gml
Last active July 11, 2022 22:11
A way of reading a bitmap as a 2D array of colors in Game Maker Studio. Works with Game Maker 8.1.
///read_bmp(filename)
// Reads 24 or 32 bit bitmap files
//returns a ds_grid of colors encoded as rgb hex
var handle;
handle = file_bin_open(argument0, 0);
var offset, width, height, bits, output;
offset = 29;
width = 0;
height = 0;
bits = 0;