Added bmp resize code