Crop image dynamically
Posted: Thu Nov 15, 2007 12:38 pm
Code: Select all
<span id="progress"></span>
<script type="text/javascript">
document.getElementById('progress').innerHTML = '<img src="progress.gif" alt="" width="' . $width . '" height="5" border="0">';
</script>This is working very well when using an image like this:

When I want to use an image like below I can't scale the image like above.
Is there some way to crop the image with Javascript or CSS?
