Tuesday, January 29, 2013

Re: GWT Canvas resize ImageData and get Canvas.toDataUrl

By the way, I don't want to paint the resized image to the UI.
Only get the resized data to thranfer to the server.



Am Mittwoch, 30. Januar 2013 07:50:44 UTC+1 schrieb Musicman75:
Hello,

for 2 days now I'm trying to resize my Canas data to get a smaller value when calling Canvas.toDataUrl.

The szenario:

User draws to a Canvas (Sign something). The drawing Canvas is sized to the Window size.
Before transgering the data to the server I want to scale the Canvas to fit to a smaller size.

I think this is very simple, but at the moment I'm bainfucked :-).

The steps:

- Get Canvas data
- Resize/Scale Canvas data
- Get data by calling Canvas.toDataUrl
- Transfer to server as image/png;base64..... String

Thanks a lot for any answer.

Stephan

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

No comments:

Post a Comment