angular-canvas-painter icon indicating copy to clipboard operation
angular-canvas-painter copied to clipboard

Maximum file size for drawImage background?

Open MarkPare opened this issue 8 years ago • 2 comments

I'm having issues loading larger base64-encoded images into canvas background. I haven't been able to find anything related to a file size limit in the docs or source. Is there something that I'm missing?

Base64 images with character length < 400,000 seem to work fine. But a 700,000 character length one will not load as background image.

Thanks.

MarkPare avatar Jul 23 '16 05:07 MarkPare

There aren't any limits implemented in the source code. It most probably depends on your browser. Probably better to use image files instead of Data URIs when working with large backgrounds.

pwambach avatar Jul 24 '16 14:07 pwambach

Thanks for your help Philipp. You were definitely right that it's better not to rely on data URI's.

I have a solicitation for advice on a question: I'm trying to center (vertically and horizontally) the canvas in it's parent, but the coordinates in the plugin are always absolute.

I haven't quite been able to find the exact location in source code where I can make modification based on relative position of canvas div so that I can have this functionality.

Any help is appreciated.

Thanks for the awesome plugin. Mark


Mark Paré

781.718.6148 [email protected] [email protected]

On Sun, Jul 24, 2016 at 10:19 AM, Philipp Wambach [email protected] wrote:

There aren't any limits implemented in the source code. It most probably depends on your browser. Probably better to use image files instead of Data URIs when working with large backgrounds.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pwambach/angular-canvas-painter/issues/27#issuecomment-234779826, or mute the thread https://github.com/notifications/unsubscribe-auth/AMqZiMSAdcAU6fO7u3QYaNnfkRk6QN9jks5qY3RfgaJpZM4JTSdJ .

MarkPare avatar Sep 04 '16 19:09 MarkPare