Or better, open array (array of byte) with would be set with SetLength and some formula, like Width*Height*NumOfComponents (where width and height are obvious and NumOfComponents would be 1 for grayscale/indexed bitmaps, 3 for RGB and 4 for RGBA).