Changed code to use 24bpp rendering