FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ImageQuality API differ on IOS and Android: Use one scale for both · Issue #5474 · NativeScript/NativeScript · GitHub

ImageQuality API differ on IOS and Android: Use one scale for both #5474

Description

On IOS, Image-Source expects a number between 0.0 to 1.0 to specify the image quality.
On Android, Image-Source expects a number netween 0 and 100.

It brings up the situation developers have to use a platform-check if the want to get a JPG with 80% quality:

   let quality = platformModule.isAndroid ? 80 : 0.8;
   return image.toBase64String("jpeg", quality);

I'd suggest to use one scale for both platforms to have an more consistent API.
What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL