if you just want to show a portion of an image
<img src="" />

set the div to have overflow hidden, and to the size you want. then
you can use css to absolutely position the img.

you can also stretch / alter the image by changing the size of the

if you want to SAVE this image (submit the cropped portion to the
server) i don't know how off the top of my head. I know there is a way
i just have never had to do this.

Hope that helped!

here is one example
<div style="overflow:hidden;height:200px;width:200px">
<img src="www.url.com/image.gif" />
<div id="mainimage">
<img src="www.url.com/image.gif" />

volia :)

On Mar 3, 5:06 am, calitom <thomas.gamb...@orange.fr> wrote:
> Hi,
> I wanted to know how you do to display the croped part of an image?
> I tryied to crop an image in php, with imagecopyresamled, but with big
> images it didn't work due to my server memory limit...
> How can i do to display just a part of an image with top left position
> of area to display and width/height of the area?
> In fact i want to display a part of an image in a div...
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to