-
Notifications
You must be signed in to change notification settings - Fork 602
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
How to specify default image URL #44
Comments
There is no ability to use default image, can you tell why you need that? But there is way to use quick-save (F9) and then after each refresh using quick-load (F10) will give you similar results. Are you talking about sending link that includes sample image(s) to friend? That's interesting... Opening urls is not supported directly, but you can copy image from web-page into clipboard and using ctrl+v in miniPaint will import that image. I will add this request to todo list. But keep in mind that only some images can be imported, (CORS restriction sometimes apply... unless website admin allows it using special headers) |
Thanks for considering my question! What is the best way to achieve this? |
The best way to achieve this:
|
current method:
method on next version: (3.4+) p.s. code works after all JS are loaded. |
Hi viliusle, I am using mini paint using iFrame in my application but I have a requirement to load an image from a URL into this mini paint . Can you please give me the code and any JS to be added . I tried this below <script> function open_image(image_id){ var img = document.getElementById(image_id); //set name var name = img.src.replace(/^.*[\\\/]/, ''); LAYER.layer_add(name); LAYER.layer_remove(1); //draw canvas canvas_active().drawImage(img, 0, 0); } </script>but its giving "LAYER is not defined" error . Please suggest.. This will a a great help for me , thanks in advance |
check this example. Basically you have to query iframe and take Layers object from there. p.s. you should create separate ticket next time. |
Excellent work, this editor is one sweet package!
Is there any way to pass a picture URL for opening as default image by appending something like ?open=encoded_url to the minipaint location?
Alternatively, is there any syntax for opening an image from a supplied URL?
e.g. FILE.open_handler(URL)?
The text was updated successfully, but these errors were encountered: