Re: image -> thumbnail widget?

2011-05-10 Thread dk
Thanks Thad,

Since posting my original note I have fond that jQuery has jCrop and
there are a few others

I am not a java expert but I'll play around a bit more

Thanks again

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: image -> thumbnail widget?

2011-05-10 Thread Thad
I don't know of such a tool.  Off hand, I'd say what's required is a
handler to track mouse movement over the image, send a coordinate or
coordinate pair back to the server, and crop the image there.

How big are the images you're dealing with? Alternative approaches
might be

1) Display the full image, calling setSize("50px","50px") and let the
browser reduce the full image to the your 50x50 area (the way it does
when you specify height and width attributes in an  tag).

2) On the server, scale the image to 50x50 using something like Java
Advance Imaging and send that to the server.

You'll need something like JAI to do the cropping you propose anyway.
Both of these solution would provide a thumbnail of the full image.

On May 9, 1:10 pm, dk  wrote:
> Hi,
>
> I am looking for ideas on how to approach the following:
>
> I have a form and part of that form is a FileUpload widget for an
> image.  After uploading I need to do a few other things like create 
> athumbnailfrom the original.  The original might be of any size but
> thethumbnailwill result in a 50x50 pixel image.
>
> I am doing this now based on the assumption that the most interesting
> part of the image is the square starting at the upper left-hand corner
> of the original image and who's sides are the smaller of the
> original's height or width.  This is a poor assumption for all images.
>
> What I would like to be able to do is upload the original image,
> create a smaller version of the original that my form / the image
> widget could then display.  Part of the display would have a square
> "view port" that could be moved around the small version of the
> original image.  Once the view port is "dropped" it would define a
> "crop" region that would then become thethumbnail.
>
> Does such a widget already exist?  If not can you suggest how [or if]
> GWT could be used to create such a thing?  I can display the image, I
> am not at all sure how to enable the view-port dragging.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



image -> thumbnail widget?

2011-05-09 Thread dk
Hi,

I am looking for ideas on how to approach the following:

I have a form and part of that form is a FileUpload widget for an
image.  After uploading I need to do a few other things like create a
thumbnail from the original.  The original might be of any size but
the thumbnail will result in a 50x50 pixel image.

I am doing this now based on the assumption that the most interesting
part of the image is the square starting at the upper left-hand corner
of the original image and who's sides are the smaller of the
original's height or width.  This is a poor assumption for all images.

What I would like to be able to do is upload the original image,
create a smaller version of the original that my form / the image
widget could then display.  Part of the display would have a square
"view port" that could be moved around the small version of the
original image.  Once the view port is "dropped" it would define a
"crop" region that would then become the thumbnail.

Does such a widget already exist?  If not can you suggest how [or if]
GWT could be used to create such a thing?  I can display the image, I
am not at all sure how to enable the view-port dragging.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.