PhotoNotes
A Flickr-like photo annotation script with the following features:
- Unlike fotonotes, does not alter the original JPEG in any way.
- Add, move, resize, and delete notes.
- Hover over a note to view the associated comment.
- Click a note to edit the comment.
- Tested with Firefox 3.5, Chrome 4, and IE 8.
The notes are not persisted to a database. However, there are function stubs available to enable saving and deleting notes with your database of choice.
Example

Installation and Usage
- Download and unzip the PhotoNotes files.
- Include the PhotoNotes JavaScript and CSS files in your site header.
- Include the appropriate script to enable PhotoNotes for your image of choice.
- Optionally implement the functions to persist the notes to your database.
<script type=”text/javascript”>
/* create the Photo Note Container */
var notes = new PhotoNoteContainer(document.getElementById(‘PhotoContainer’));
/* create a couple of notes, and add them to the container */
var note1 = new PhotoNote(‘Atmel ATMega168′,3,new PhotoNoteRect( 150,250,50,135));
note1.onsave = function (note) { return 1; };
note1.ondelete = function (note) { return true; };
var note2 = new PhotoNote(‘2048Hz buzzer’,3,new PhotoNoteRect(172,75,69,69));
note2.onsave = function (note) { return 1; };
note2.ondelete = function (note) { return true; };
notes.AddNote(note1);
notes.AddNote(note2);
function AddNote()
{
var newNote = new PhotoNote(‘Add note text here…’,-1,new PhotoNoteRect(10,10,50,50));
newNote.onsave = function (note) { return 1; };
newNote.ondelete = function (note) { return true; };
notes.AddNote(newNote);
newNote.Select();
}
</script>
Changelog
1.5
Initial release. DownloadAcknowledgments
Thanks go to Dusty at dustyd.net for the original script. I basically took his code last updated in 2006 and made it work with the latest browsers.
Great work Matthew – like this idea a lot!
@Michael Toso
Thanks Michael. I searched but didn’t find any (maintained) script that does the same thing. Hopefully people will find it useful. At least I will.
Hello
How MYSQL database can be saved?
Is sample available?
Hi,
I wanted to have the option that the notes cannot be edited. It seems that this is not working by using the available functions.
Can someone please verify this?
Thanks,
Michael
I have already fixed this on my local version. I can provide a patch if you like.
- Michael
Hi,
Can you alert me to the latest update…I am building a website for our camera club (non profit) and this photo notes would be a great asset to the users on our site…please let me know via my email what you recommend and possibly send me the script if it is freeware.
Thanks,
Jim
@jim
Hi Jim,
I have given thoughts to 1) creating a WordPress plugin to allow authors to use PhotoNotes and 2) creating a generic PHP/MySQL implementation of PhotoNotes but have not yet done so. What database does your website use?
Wonderfull work remake. I’ll custom it to my needs, then i’ll make MySQL interface to it…
@jim
Hi,
I use mySQL and that would be great if you could create the php /mysql tables…thanks a million…can you email me the scripts…greatly appreciated.
Thanks again for your time!
Jim