or download this
# Start with a blank image - somehow this causes memory cleanup
$TK{'image-'.$NVP{'Id'}}=$TK{'canvas-'.$NVP{'Id'}}->Photo(-file =>
+ "" );
...
$TK{'image-'.$NVP{'Id'}}=$TK{'canvas-'.$NVP{'Id'}}->Photo($NVP{'Id
+'},
-file
+=> $NVP{'File'},
-format
+=> $image{'extension'});