compress bitmap image into jpeg image