Skip to content

PNG getting Converted to JPG when selecting Images from Gallery #927

@yeshwanthsai1010

Description

@yeshwanthsai1010

When using the Cordova Camera plugin with the encodingType option as JPEG,

I noticed that when selecting a PNG image from the gallery, the plugin modifies both the file name and type, converting the image to JPG if any scaling or modifications are applied.

Expected Behavior:

  • The file name may change due to processing, but the original image format (PNG) should be retained unless explicitly converted by the user.

Observed Behavior:

  • When a PNG image is selected, the plugin automatically converts it to JPG after applying modifications (e.g., scaling).
  • The encoding type seems to be applied regardless of the source image format, leading to unexpected format conversion.

Questions:

  • Is this the expected behavior?
  • Is there a specific reason for converting PNG images to JPG?
  • Can the plugin be modified to retain the original image format when selecting images from the gallery?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Triange/ConfirmationIssue that needs a reproduction or confirmation of a bug or issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions