Skip to content

Drawing scaled images to canvas fails on iOS devices for large image sizes  #13

Closed
@blueimp

Description

@blueimp

StackOverflow references:

HTML5 Canvas drawImage ratio bug iOS
MobileSafari not returning the right image size info via JavaScript
Mobile Safari renders scaled on Canvas?

iOS references:

Known iOS Resource Limits

Possible solution:

There is a JavaScript canvas resize library which works around the subsampling and vertical squash issues encountered when drawing scaled images on canvas on iOS devices: http://github.com/stomita/ios-imagefile-megapixel

There are side issues when scaling images with alpha channel (as it uses the alpha channel for the issues detection) and when trying to resize existing canvas elements.
However, it does solve the issue at hand.

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