Skip to content

canvas.toDataURL('image/jpeg') returns image/png on Android #33

Open
@ghinda

Description

@ghinda

Summary:

The toDataURL() method of the canvas element allows specifying the format in which to return the data url. By default it returns image/png, but specifying image/jpeg should return a JPEG image.

On Android, it always returns a image/png data url, regardless of the type parameter.

On desktop, Chrome returns the proper data url with the image/jpeg type.

More details:
http://ghinda.net/jpeg-blob-ajax-android/

Platforms:

  • Android 4+

How to reproduce:

  1. Check the example on Android 4+

Reduced Example:

http://jsfiddle.net/ghinda/na86m/

Bug Tracker ticket(s):

Workarounds:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions