-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotation, grayscale, upload and save #19
Comments
Hi Nick, Most of what you are describing can be done in jquery-cropbox, this is
For making the image grayscale and rotating the image, you will have to The nice thing, is that at least in modern browsers all of the above can PS: When I get some spare time I plan to add some examples to the documentation on how to use custom controls. Its fairly simple, just provide either a jquery object containing the dom elements of your control, or a string containing the html describing your controls to the cropbox. I'll close this issue for now. Feel free to comment here if you have any other questions. |
Thanks so much for the response. When you say canvas, are you suggesting a file-selection like this, then selecting the canvas and writing it out as a PNG so that it can be jquery-cropbox'ed? |
Yup, but I don't know what you mean by "writing it out as png". You don't need to write anything, just point the src of the image to the generated dataURL and cropbox can take it from there. (perhaps this is what you meant, the png bit is what threw me off, since although the dataURL might be in png format, it doesn't need to be, since that is a browser dependent implementation detail). EDIT: In more detail, you can use canvas.toDataURL() to get the URL for the generated canvas image. You should do the grayscale transformation before you generated the dataURL. |
Ah, okay. Awesome. Thanks for taking me through that. |
Hi Alex,
Great repository. Thank you for your work on this. Today, I started working on a web page that will allow a user to do the following things:
Your cropbox has the zoom / pan / crop ability I'm looking for—do have any pro-tips for what I might use for the other parts?
The text was updated successfully, but these errors were encountered: