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:
Verified
Q89: Assuming that we have correctly instantiated a
Q90: Assuming that we have two Location object
Q91: Assuming that the device has a camera
Q92: We have a camera app activity, and
Q93: We have an ImageView reference named iv
Q95: The MyHandler class extends the DefaultHandler class;
Q96: To create an Intent to open a
Q97: Inside an Activity class, we want to
Q98: We want to load an AdRequest named
Q99: Write the code to create a Cipher
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents