max(1, img.height);
	                    	
	                    	// Converts format of data url to cell style value for use in vertex
	        				var semi = data.indexOf(';');
	        				
	        				if (semi > 0)
	        				{
	        					data = data.substring(0, semi) + data.substring(data.indexOf(',', semi + 1));
	        				}

	        				graph.insertVertex(null, null, '', x, y, w, h, 'shape=image;image=' + data + ';');
                    	};
                    	
                    	img.src 