Instructions Will Show Below. Add Text With The Text Box On The Right, Add Extra Images By Clicking Images Below The Canvas
Free Web Developer Tutorials With Working Demos Here
This is a simple Demo by Chris Bloor on how you can build a html5 image editor, it uses Eric Rowell kinetic.js library, his book is available to buy online, I bought it from www.amazon.co.uk, you can click on the image of the book to take you straight to the book on Amazon UK.If you can't see anything on the image editors canvas you will need to use a modern browser, because many people use IE with Windows XP then I recommend Firefox and it can be downloaded here Firefox Download Windows XP does not support IE9+, IE8 and below do not support many html 5 tags.
The heart image is static, the teddy can be dragged and resized by clicking when the mouse curser changes to a pointer it can be clicked on all 4 corners to re-size.
Click on the images below the canvas to add them to the canvas and drag and drop into position, double click on them to remove them, you can add text by typing text into the text box, change colour and font family and click add text, again you can remove the text by double clicking on the text.
Download all the files from my tutorial site Html5 Image Editor Tutorial And Download















can anyone help me with saving the canvas to the server the canvas is in the container div not on a canvas tag so the usual way is not working
Thanks
Fixed This
$(\'#save\').click( function() {
stage.toDataURL(function(dataUrl) {
$.post(\"ajax.php\", { data: dataUrl },
function(data) {
alert(\"Your Design Was Saved To The Server\");
});
});
});
and then create a new file called ajax.php
$png =$_POST[\'data\'];
$filteredData=substr($png, strpos($png, \",\")+1);
$unencodedData=base64_decode($filteredData);
$fp = fopen( \'image.png\', \'wb\' );
fwrite( $fp, $unencodedData);
fclose( $fp );
?>
Hi,
Can I ask you question please?
When you double click the small images below the canvas, the image added to the canvas dynamically.
How do you do this?
Can you help me please?
Regards,
Ayi
Hi Ayi, here are a few links for you on the forum that will show you how to do it
http://www.kineticjs.com/forum/viewtopic.php?f=10&t=554&p=1874&hilit=onclick#p1874
and here is a working demo if you view the source code you can copy and paste it
www.fishclassifiedsuk.co.uk/canvas/
you will need to replace the images with images of your own any problems let me know
good luck
Hello,
First of all thankyou for the image editor. Its helped me get started with a project im working on for a new website. I want to be able to dynamically load images into a html5 canvas that can be then dragged around the canvas area. With the help of this image editor ive managed this but I also want to beable to resize the images in the same way you can on the tutorial on html5 tutorials with anchor points in each corners but im struggling to get them added to each image with they are loaded into the canvas area. Is this something you looked into?
Hi Alex, thank you for the comment, if you contact me on the contact link above then i will help you via email if that is ok with you
Hello ,
I want to find this code as shown in above pleae give me code for develop this functionality .
I am unable to purchase this from anywhere so please provide me code in my email
Hi Abhishek, the editor is mainly javascript so if you want the script you can just view the source and take it you need to include the kinetic.js which is version 9.3
http://www.html5imageeditor.co.uk/js/kinetic-v3.9.3.js
and jquery
http://www.html5imageeditor.co.uk/js/jquery.min.js
and the version1.js which is what controls the editor
http://www.html5imageeditor.co.uk/js/version1.js
if you need any help with your project let me know always happy to help
Thank you Chris
Hello Chris,
I am very happy when i saw your response and want to give thanks for this .
Chrs i need some other and some different thing :
Actually i want to Edit map in PDF in this i can be able to drag and drop of bulbs
so for develop this type of functionality i need PDF or Image editor in that i can drag/drop and resize of canvas image .
If you have this type of any tool/code available on either free or from purchase so please give me or sugest me .
Hi Abhishek, are you after away of loading an image of a map onto the canvas and then from there add markers and some text, once you have made the map you would like to save it as a PDF ? if so i can do this for you tonight.
Thanks Chris
Chris,
thanks for cordination
I want to save this editable image on to pdf.But i am still facing problem show /edit/drag/delete of imae in canvas element.
I have request to you can you please give me above code in zip with save in PDF .
I am waitnig for your response i know you will do it .
Thanks
abhishek
9039448756
add me gtalk/skype : abhishek.dubey.acs
No Problem i will do this for you tonight
Chris
I have started to help Abhishek with his project, at the moment we have a static map where we can add speech bubbles to the canvas and then add text over the bubbles, we can then put the canvas into the CK Editor and turn the designed map into a PDF Application link below
http://www.html5imageeditor.co.uk/map-maker.php
If anyone needs help with any projects where this editor could be useful then please let me know
Thank you Chris
Hi Chris,
I am come back ,since few days i was busy some where ,but now start working .
Now i am doing - save canvas with it background image to server but problem is that :
I am using to show background image of css
#container {
background-image: url();
}
and for canvas i am yoda: image_canvas
so both are different thing so i am unabel to use .toDataUrl so please help me .I know you are experienced to design this ,and hope will help me .
Abhishek
Hi Abhishek, send me a link to your project
hello, hope you are fine as you want to ask a question like do to save the canvas in database
Hi, I would not save the canvas into the database i would upload the png file into a folder on your server and then i would save the route of the image into the database.
so you save the image in a folder called images
and in the database you save
myimage.png in the database
and then display the image with the route images/myimage.png
hope this makes sense
Thanks Chris
Hi Chris,
What you\'ve been doing here is very close to something I am trying to achieve using the Kinetic script but have hit a wall - could you help me solve this?
I\'m creating a drag and drop where I\'d like people to be able to save or share their image (of the canvas) so instead of the \'saved\' image opening in a new window (just like your preview), the generated dataURI would go into a placeholder (so the page can be styled) and then have the option to post to facebook etc - do you know how this is done - very similar to your map example, only I don\'t need to generate a PDF, just an image.
Any help you could offer would be much appreciated Thanks!
Hi Ed, contact me on the contact link in the nav and i will reply vial email or skype or msn
Thanks Chris
Hye chris. Good job over there~!.
I am interested in doing the thing you have done there. But i do not know where to start and how to do it? Can you guide me on the steps? Because i am building a web application that function almost the same like you did.
Thank you.
Hye chris. Good job over there~!.
I am interested in doing the thing you have done there. But i do not know where to start and how to do it? Can you guide me on the steps? Because i am building a web application that function almost the same like you did.
Thank you.
I have sent you an email any problems let me know and i will help you ASAP
Thanks Chris
Hello Chris, is a great tool! congratulations.
I created the ajax.php and with a developer tool I searched all pictures Js,... in the source code, but it does not work, perhaps there is something that I copy evil could send me the code please?
peter.crepel @ gmail.com
is for project with \"moodle\" and could use great
many thanks in advance.
Hi Peter, I have emailed you the files you require
Good Luck
Hi Chris ,
Thanks for such great example and work. This example was really a great help for my current project.
I have a question regarding wordpress integration of canvas.
It seems http://www.html5imageeditor.co.uk/ is developed using wordpress? Can you please provide me some guidelines on how can I integrate similar thing in wordpress. Is there any plugin or widget available for this?
Thanks,
-Amit
Hi Amit, , I wrote the editor using kinetic.js library i dont use wordpress much a so i cant help you with a plugin, but it should not be difficult if you have wordpress experience I can send you the files if you wish
Thanks Chris
Thanks very much Chris for quick reply,
Please send me files on mr.amitghuge@gmail.com.
Thanks,
-Amit