fixed order of pixels in image save