embiem / react-canvas-draw

React Component for drawing in canvas
https://embiem.github.io/react-canvas-draw/
MIT License
904 stars 315 forks source link

Accepting Blob url or base64 in imgSrc #26

Open santosh898 opened 5 years ago

santosh898 commented 5 years ago

Thanks for a powerful lightweight library, I was trying set custom background using both blob and base64 and looks like it failed to load and fallback to default background. It would be nice if imgSrc can handle blob urls or base64 urls aswell.

embiem commented 5 years ago

I agree, will tag as bug.

Code-Crash commented 4 years ago

Hi @embiem

Any progress on this bug? or can I create a PR for the same?

Thanks

embiem commented 4 years ago

@Code-Crash you're welcome to create a PR to fix this!

I'll assign you to this issue, thanks a lot!

Code-Crash commented 4 years ago

@embiem

Let me try,

one quick question, from where I can create sub-branch for PR? master or develop as I can see after the clone, the primary branch is develop branch.

Code-Crash commented 4 years ago

Hi @embiem

I have added a fix as a feature (Refreshable Background Image), but I'm unable to push the new branch. I have created a branch from the develop branch.

Error:

remote: Permission to embiem/react-canvas-draw.git denied to Code-Crash.
fatal: unable to access 'https://github.com/embiem/react-canvas-draw.git/': The requested URL returned error: 403

Can you give me the permissions or I need to do by myself (any guide)?

Thanks

embiem commented 4 years ago

@Code-Crash Please fork the repo and branch off develop, push your changes to your fork and create a PR using the GitHub UI. Here's a guide: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork

Code-Crash commented 4 years ago

@embiem Thanks, I will update the PR.

Code-Crash commented 4 years ago

@embiem Updated the PR, review and please merge it.

embiem commented 4 years ago

Thanks! Looking good, I just requested one change and added suggestions that you could immediately commit via the Github UI.

Also, your PR will fix issue #61, but not actually this issue, right? This issue is about using a blob or base64 as the image source.

Code-Crash commented 4 years ago

So, we can pass the base64 or blob in imgSrc and it worked, I have tested it.