fixing scaling/contrast for 1/4/8 bpp