mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
separate checking JPG and JPEG formats in getTargetFormat (#4544)
* separate checking JPG and JPEG formats in getTargetFormat * stack the 2 cases together
This commit is contained in:

committed by
Alexander Vakrilov

parent
3dbcf088be
commit
23fe7d4177
@ -205,7 +205,8 @@ export class ImageSource implements ImageSourceDefinition {
|
|||||||
|
|
||||||
function getTargetFormat(format: "png" | "jpeg" | "jpg"): android.graphics.Bitmap.CompressFormat {
|
function getTargetFormat(format: "png" | "jpeg" | "jpg"): android.graphics.Bitmap.CompressFormat {
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case "jpeg" || "jpg":
|
case "jpeg":
|
||||||
|
case "jpg":
|
||||||
return android.graphics.Bitmap.CompressFormat.JPEG;
|
return android.graphics.Bitmap.CompressFormat.JPEG;
|
||||||
default:
|
default:
|
||||||
return android.graphics.Bitmap.CompressFormat.PNG;
|
return android.graphics.Bitmap.CompressFormat.PNG;
|
||||||
|
Reference in New Issue
Block a user