generate thumbnail using getRGBApixels