Use JPEG mask image to reduce size