Podés usar el método toDataURL. Un ejemplo básico
aquí:
Código PHP:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script type="text/javascript">
function porcion(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight){
if(document.createElement('canvas').getContext){
var c=document.createElement('canvas');
c.width=dWidth;
c.height=dHeight;
ctx=c.getContext('2d');
ctx.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);
var src=c.toDataURL();
var im=document.createElement('img');
im.src=src;
document.body.appendChild(im);
im=c=null;
}
}
</script>
</head>
<body>
<img id="pp" src="arwen.jpg" width="500" height="350" />
<form>
<input onclick="porcion(document.getElementById('pp'), 0, 0, 50, 50, 0, 0, 50, 50)" type="button" name="button" id="button" value="porcion1" />
<input onclick="porcion(document.getElementById('pp'),50, 100, 100, 100, 0, 0, 100, 100)" type="button" name="button2" id="button2" value="porcion2" />
</form>
</body>
</html>