Solved

We Want to Write a Bitmap Named Bitmap to a FileOutputStream

Question 18

Short Answer

We want to write a Bitmap named bitmap to a FileOutputStream named fos using the compress method of the Bitmap class, which has the following API:
public boolean compress( Bitmap.Compress.Format format, int quality, OutputStream stream )
The quality parameter should be between 0 and 100 (highest quality).
Bitmap.Compress.Format is an enum that includes the constants PNG and JPEG.
Write bitmap as a JPEG of the highest quality to the file represented by fos.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions