GWT URL parameters not setting and getting when has domain

2017-05-25 Thread Julio Heitor Nobrega
Hi guys,

I have an issue that you could help me. I am developing a e-commerce GWT 
website and when i access the paltform using the IP address i can get and 
set url parameters(product id and profile id) with no problem.

But when i access the platform using the DNS domain (eious.com) no 
parameters is set and even if i put the parameters manually, the app cannot 
get the values.

Do you know why this hapens? If you like to check out the platform using 
the IP you can access by this url: 104.236.209.250:8086 
.

Best regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Opening a File Chooser (using FileUpload Widget) from a DialogBox

2016-04-12 Thread Julio Heitor Nobrega

   Dear friends,

   i am having some problemas using the *FileUpload *widget and the 
*DialogBox*.

  If i try to open the file chooser to choose a image from the file system 
from FileUpload like this:

new *ClickHandler*() {

@Override
public void* onClick(*ClickEvent event) {

*FileUploader *upload = new 
*FileUploader*((Image)event.getSource()
*);*upload*.click*();
}
};

  Everything goes fine because the image is attached direct to the 
RootPanel.

  Buy if i use the same code with the image (or could be a button as well) 
inside a *DialogBox*, nothing happens and the file chooser does not open.

  I am using the GWT 2.7.

  Could anyone help me with this?

  Best regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT WYSIWYG Editor

2016-04-11 Thread Julio Heitor Nobrega

   Hi Guys,

  does anyone know if there is some WYSIWYG Editor for GWT?  I have found 
some old projects that implement the basic stuff but it does not work 
anymore in a GWT 2.7 project.

  If someone has any RichTextToolBar to share here, please let me know!

  Regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Uploading Local Image Content

2016-03-18 Thread Julio Heitor Nobrega

  Dear friends,

  i am trying to upload a file system image's content to my GWT site and i 
stumbled across this code:

   

   *public*


* final native void readAsDataURL(MyClass that, FileUpload input) /*-{
 var files = 
inp...@com.google.gwt.user.client.ui.FileUpload::getElement()().files;
 var reader = new FileReader();  
 reader.onload = function (evt) {
 that.@...MyClass::done(Ljava/lang/String;)(evt.target.result);
 }
 reader.readAsDataURL(files[0]);
}-*/;*  I am assuming that some attribute of MyClass is receiving the 
image's content. But i dont know neither what
attribute is that nor how to choose another one.

  Could someone help me?

  Best Regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Forbidden words Service for GWT

2016-02-25 Thread Julio Heitor Nobrega

   I have found a paid webservice: webpurify.com

   It handles 15 languages but i would have to test if it identifies bad 
words of all kind.
 
   I have also found a quite nice google list that could be a good start 
(download it from github): 
http://laughingsquid.com/the-full-list-of-bad-words-banned-by-google/ 

  Regards!
 
Em quinta-feira, 25 de fevereiro de 2016 09:56:38 UTC-3, Julio Heitor 
Nobrega escreveu:
>
>
> Hey guys,
>
> i am developing a e-commerce site using GWT and i would like to ask if 
> there is some paid/free webservice solution that verifies the existence of 
> forbidden words (violence, sexual, weapon and/or  hate related) give a 
> String.
>
> Best regards! 
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Forbidden words Service for GWT

2016-02-25 Thread Julio Heitor Nobrega

Hey guys,

i am developing a e-commerce site using GWT and i would like to ask if 
there is some paid/free webservice solution that verifies the existence of 
forbidden words (violence, sexual, weapon and/or  hate related) give a 
String.

Best regards! 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-27 Thread Julio Heitor Nobrega
Hi Claudio,

thank you for your post. You method could only be used if implemented on
the server side.

GWT does not support the awt API.

Regards!

2016-01-27 8:01 GMT-02:00 Kirill Prazdnikov <pkir...@gmail.com>:

> How do you use AWT code in client GWT code ?
>
>
> On Wednesday, January 27, 2016 at 12:19:15 PM UTC+3, claudio sergio
> Goncalves wrote:
>>
>> Hi julio
>>
>> i use this routine to redimensione my images
>>
>> public static BufferedImage redimensionarImagem(BufferedImage img, int
>> maltura, int mlargura) throws Exception {
>>
>> java.awt.Image imagem = (java.awt.Image) img;
>> java.awt.Image thumbs = ((java.awt.Image) imagem)
>> .getScaledInstance(mlargura, maltura, BufferedImage.SCALE_SMOOTH);
>> BufferedImage buffer = new BufferedImage(mlargura, maltura,
>> BufferedImage.TYPE_INT_RGB);
>> buffer.createGraphics().drawImage(thumbs, 0, 0, null);
>> return buffer;
>> }
>> pass the width and height in pixels (maltura e mlargura)
>> After thar you can upload the image.
>>
>> cheers
>>
>> Claudio
>>
>>
>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>> Nobrega escreveu:
>>>
>>> Hi guys,
>>>
>>> i am trying to upload images with 2mb size but i don't want to send the
>>> whole original image to the server.
>>>
>>> What i would like to do is reduce the image dimensions from, for
>>> example, *1000x1000* to *50x50* and reduce the file size
>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to
>>> the server.
>>>
>>> I know there is the Scalr framework that does that in java, but its no
>>> compatible with GWT clients.
>>>
>>> Is there any client side GWT library that does the same thing as Scalr?
>>>
>>> Best Regards!
>>>
>>>
>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
As a matter of fact, i am beginning to think that its more wise to send the
whole image to the server, scale it using Scalr and store it into the DB.

I want to have the control of the image size, test levels of quality. The
Scalr has a mode called 'Automatic' that fits your image to the dimensions
you pass to it.

None of it i will have with GWT Canvas.

The only drawback i would get using Scalr is that i will consume more
bandwidth DigitalOcean  gives me monthly because i will have to send the
whole image to the server.

2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>:

> Thanks for your answer Greg!
>
> Actually, i really need a byte array because i will store it in a BLOB
> database column.
>
> Regards!
>
> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>
>> Just use context.getCanvas().toDataUrl(); which will return data uri with
>> the contents of the canvas. You can use it directly in  element
>> or send it to server.
>>
>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
>> wrote:
>>>
>>> I have just found an example (http://c.gwt-examples.com/home/ui/canvas).
>>>
>>> The only problem is to convert ImageData to an byte array :)
>>>
>>> Regards!
>>>
>>>
>>>
>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com>:
>>>
>>>> Does anyone have some examples regarding the Canvas class?
>>>>
>>>> I've seen the java doc API but the only methods i think that could be
>>>> useful was:
>>>>
>>>> Context2d
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>>  *getContext2d
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
>>>> ()
>>>>   Returns a 2D rendering context.
>>>>  void *setCoordinateSpaceHeight
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
>>>> (int height)
>>>>   Sets the height of the internal canvas coordinate space.
>>>> void *setCoordinateSpaceWidth
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
>>>> (int width)
>>>>   Sets the width of the internal canvas coordinate space.
>>>>
>>>> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pki...@gmail.com>:
>>>>
>>>>> Canvas is an DOM Element.
>>>>> It can render Image Elements to itself in any resolution.
>>>>> However it may produce not nice results.
>>>>>
>>>>> It depends on what you need.
>>>>>
>>>>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor
>>>>> Nobrega wrote:
>>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> thanks everyone for the answers!
>>>>>>
>>>>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>>>>> itself?
>>>>>>
>>>>>> Do you have any example of use?
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>>
>>>>>>
>>>>>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>>>>>> Nobrega escreveu:
>>>>>>>
>>>>>>> Hi guys,
>>>>>>>
>>>>>>> i am trying to upload images with 2mb size but i don't want to send
>>>>>>> the whole original image to the server.
>>>>>>>
>>>>>>> What i would like to do is reduce the image dimensions from, for
>>>>>>> example, *1000x1000* to *50x50* and reduce the file size
>>>>>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image
>>>>>>> to the server.
>>>>>>>
>>>>>>> I know there is the Scalr framework that does that in java, but its
>>>>>>> no compatible with GWT clients.
>>>>>>>
>>>>>>> Is there any client side GWT library that does the same thing as
>>>>>>> Scalr?
>>>>>>>
>>>>>>> Best Regards!
>>>>>>>
>>>>>>>
>>>>>>> --

Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Does anyone have some examples regarding the Canvas class?

I've seen the java doc API but the only methods i think that could be
useful was:

Context2d
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
*getContext2d
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
()
  Returns a 2D rendering context.
 void *setCoordinateSpaceHeight
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
(int height)
  Sets the height of the internal canvas coordinate space.
void *setCoordinateSpaceWidth
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
(int width)
  Sets the width of the internal canvas coordinate space.

2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pkir...@gmail.com>:

> Canvas is an DOM Element.
> It can render Image Elements to itself in any resolution.
> However it may produce not nice results.
>
> It depends on what you need.
>
> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor Nobrega
> wrote:
>>
>> Hi guys,
>>
>> thanks everyone for the answers!
>>
>> Greg,  is Canvas a GWT framework or its a class that belong to GWT itself?
>>
>> Do you have any example of use?
>>
>> Regards
>>
>>
>>
>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>> Nobrega escreveu:
>>>
>>> Hi guys,
>>>
>>> i am trying to upload images with 2mb size but i don't want to send the
>>> whole original image to the server.
>>>
>>> What i would like to do is reduce the image dimensions from, for
>>> example, *1000x1000* to *50x50* and reduce the file size
>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to
>>> the server.
>>>
>>> I know there is the Scalr framework that does that in java, but its no
>>> compatible with GWT clients.
>>>
>>> Is there any client side GWT library that does the same thing as Scalr?
>>>
>>> Best Regards!
>>>
>>>
>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
I have just found an example (http://c.gwt-examples.com/home/ui/canvas).

The only problem is to convert ImageData to an byte array :)

Regards!



2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>:

> Does anyone have some examples regarding the Canvas class?
>
> I've seen the java doc API but the only methods i think that could be
> useful was:
>
> Context2d
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>  *getContext2d
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
> ()
>   Returns a 2D rendering context.
>  void *setCoordinateSpaceHeight
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
> (int height)
>   Sets the height of the internal canvas coordinate space.
> void *setCoordinateSpaceWidth
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
> (int width)
>   Sets the width of the internal canvas coordinate space.
>
> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pkir...@gmail.com>:
>
>> Canvas is an DOM Element.
>> It can render Image Elements to itself in any resolution.
>> However it may produce not nice results.
>>
>> It depends on what you need.
>>
>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor Nobrega
>> wrote:
>>>
>>> Hi guys,
>>>
>>> thanks everyone for the answers!
>>>
>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>> itself?
>>>
>>> Do you have any example of use?
>>>
>>> Regards
>>>
>>>
>>>
>>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>>> Nobrega escreveu:
>>>>
>>>> Hi guys,
>>>>
>>>> i am trying to upload images with 2mb size but i don't want to send the
>>>> whole original image to the server.
>>>>
>>>> What i would like to do is reduce the image dimensions from, for
>>>> example, *1000x1000* to *50x50* and reduce the file size
>>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to
>>>> the server.
>>>>
>>>> I know there is the Scalr framework that does that in java, but its no
>>>> compatible with GWT clients.
>>>>
>>>> Is there any client side GWT library that does the same thing as Scalr?
>>>>
>>>> Best Regards!
>>>>
>>>>
>>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "GWT Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Thanks for your answer Greg!

Actually, i really need a byte array because i will store it in a BLOB
database column.

Regards!

2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:

> Just use context.getCanvas().toDataUrl(); which will return data uri with
> the contents of the canvas. You can use it directly in  element
> or send it to server.
>
> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
> wrote:
>>
>> I have just found an example (http://c.gwt-examples.com/home/ui/canvas).
>>
>> The only problem is to convert ImageData to an byte array :)
>>
>> Regards!
>>
>>
>>
>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com>:
>>
>>> Does anyone have some examples regarding the Canvas class?
>>>
>>> I've seen the java doc API but the only methods i think that could be
>>> useful was:
>>>
>>> Context2d
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>  *getContext2d
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
>>> ()
>>>   Returns a 2D rendering context.
>>>  void *setCoordinateSpaceHeight
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
>>> (int height)
>>>   Sets the height of the internal canvas coordinate space.
>>> void *setCoordinateSpaceWidth
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
>>> (int width)
>>>   Sets the width of the internal canvas coordinate space.
>>>
>>> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pki...@gmail.com>:
>>>
>>>> Canvas is an DOM Element.
>>>> It can render Image Elements to itself in any resolution.
>>>> However it may produce not nice results.
>>>>
>>>> It depends on what you need.
>>>>
>>>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor Nobrega
>>>> wrote:
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> thanks everyone for the answers!
>>>>>
>>>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>>>> itself?
>>>>>
>>>>> Do you have any example of use?
>>>>>
>>>>> Regards
>>>>>
>>>>>
>>>>>
>>>>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>>>>> Nobrega escreveu:
>>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> i am trying to upload images with 2mb size but i don't want to send
>>>>>> the whole original image to the server.
>>>>>>
>>>>>> What i would like to do is reduce the image dimensions from, for
>>>>>> example, *1000x1000* to *50x50* and reduce the file size
>>>>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image
>>>>>> to the server.
>>>>>>
>>>>>> I know there is the Scalr framework that does that in java, but its
>>>>>> no compatible with GWT clients.
>>>>>>
>>>>>> Is there any client side GWT library that does the same thing as
>>>>>> Scalr?
>>>>>>
>>>>>> Best Regards!
>>>>>>
>>>>>>
>>>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "GWT Users" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> google-web-toolkit+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to google-we...@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Hi Alain,

nice code! I am going to do this but in a java version code. I just didn't
know i could get the image path from a 'value' of the

document.getElementById("fileUpload")

I could even show a image preview to the user before send it to the server!

Or maybe convert the base64 String to byte array, scale it and then send to
the server :)

Thanks!

2016-01-25 14:22 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:

> I think what you should to is get the base64  representation of the image
> from the canvas. Something like
>
> var p;var canvas = document.createElement("canvas");
> var img1=document.createElement("img");
> function getBase64Image(){
> p=document.getElementById("fileUpload").value;
> img1.setAttribute('src', p);
> canvas.width = img1.width;
> canvas.height = img1.height;
> var ctx = canvas.getContext("2d");
> ctx.drawImage(img1, 0, 0);
> var dataURL = canvas.toDataURL("image/png");alert("from getbase64 
> function"+dataURL );
> return dataURL;}
>
> Then send the base64 to the server and corvert it to byterarry or whatever
> format you need there to save it to disc,
>
>
>
> On 25 January 2016 at 17:11, Julio Heitor Nobrega <juliohnobr...@gmail.com
> > wrote:
>
>> Hi Alain,
>>
>> i am doing exactly that. I am sending the byte array to the server,
>> saving it as a file in a directory and storing the path in a DB column.
>>
>> My problem is to get the byte array from the file (is it possible to get
>> the byte array using FileUpoad?) and work on it before send to the server.
>>
>> 2016-01-25 13:39 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:
>>
>>> Would it be a better designer to save the image on disc and just save
>>> the link to the image to the DB ?
>>>
>>> On 25 January 2016 at 15:59, Julio Heitor Nobrega <
>>> juliohnobr...@gmail.com> wrote:
>>>
>>>> As a matter of fact, i am beginning to think that its more wise to send
>>>> the whole image to the server, scale it using Scalr and store it into the
>>>> DB.
>>>>
>>>> I want to have the control of the image size, test levels of quality.
>>>> The Scalr has a mode called 'Automatic' that fits your image to the
>>>> dimensions you pass to it.
>>>>
>>>> None of it i will have with GWT Canvas.
>>>>
>>>> The only drawback i would get using Scalr is that i will consume more
>>>> bandwidth DigitalOcean  gives me monthly because i will have to send the
>>>> whole image to the server.
>>>>
>>>> 2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <
>>>> juliohnobr...@gmail.com>:
>>>>
>>>>> Thanks for your answer Greg!
>>>>>
>>>>> Actually, i really need a byte array because i will store it in a BLOB
>>>>> database column.
>>>>>
>>>>> Regards!
>>>>>
>>>>> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>>>>>
>>>>>> Just use context.getCanvas().toDataUrl(); which will return data uri
>>>>>> with the contents of the canvas. You can use it directly in 
>>>>>> element or send it to server.
>>>>>>
>>>>>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
>>>>>> wrote:
>>>>>>>
>>>>>>> I have just found an example (
>>>>>>> http://c.gwt-examples.com/home/ui/canvas).
>>>>>>>
>>>>>>> The only problem is to convert ImageData to an byte array :)
>>>>>>>
>>>>>>> Regards!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com
>>>>>>> >:
>>>>>>>
>>>>>>>> Does anyone have some examples regarding the Canvas class?
>>>>>>>>
>>>>>>>> I've seen the java doc API but the only methods i think that could
>>>>>>>> be useful was:
>>>>>>>>
>>>>>>>> Context2d
>>>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>>>>>>  *getContext2d
>>>>>>>> <http://www.gwtproject.org/javadoc/latest/com/goog

Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Hi Alain,

i am doing exactly that. I am sending the byte array to the server, saving
it as a file in a directory and storing the path in a DB column.

My problem is to get the byte array from the file (is it possible to get
the byte array using FileUpoad?) and work on it before send to the server.

2016-01-25 13:39 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:

> Would it be a better designer to save the image on disc and just save the
> link to the image to the DB ?
>
> On 25 January 2016 at 15:59, Julio Heitor Nobrega <juliohnobr...@gmail.com
> > wrote:
>
>> As a matter of fact, i am beginning to think that its more wise to send
>> the whole image to the server, scale it using Scalr and store it into the
>> DB.
>>
>> I want to have the control of the image size, test levels of quality. The
>> Scalr has a mode called 'Automatic' that fits your image to the dimensions
>> you pass to it.
>>
>> None of it i will have with GWT Canvas.
>>
>> The only drawback i would get using Scalr is that i will consume more
>> bandwidth DigitalOcean  gives me monthly because i will have to send the
>> whole image to the server.
>>
>> 2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>
>> :
>>
>>> Thanks for your answer Greg!
>>>
>>> Actually, i really need a byte array because i will store it in a BLOB
>>> database column.
>>>
>>> Regards!
>>>
>>> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>>>
>>>> Just use context.getCanvas().toDataUrl(); which will return data uri
>>>> with the contents of the canvas. You can use it directly in 
>>>> element or send it to server.
>>>>
>>>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
>>>> wrote:
>>>>>
>>>>> I have just found an example (http://c.gwt-examples.com/home/ui/canvas
>>>>> ).
>>>>>
>>>>> The only problem is to convert ImageData to an byte array :)
>>>>>
>>>>> Regards!
>>>>>
>>>>>
>>>>>
>>>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com>:
>>>>>
>>>>>> Does anyone have some examples regarding the Canvas class?
>>>>>>
>>>>>> I've seen the java doc API but the only methods i think that could be
>>>>>> useful was:
>>>>>>
>>>>>> Context2d
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>>>>  *getContext2d
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
>>>>>> ()
>>>>>>   Returns a 2D rendering context.
>>>>>>  void *setCoordinateSpaceHeight
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
>>>>>> (int height)
>>>>>>   Sets the height of the internal canvas coordinate space.
>>>>>> void *setCoordinateSpaceWidth
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
>>>>>> (int width)
>>>>>>   Sets the width of the internal canvas coordinate space.
>>>>>>
>>>>>> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pki...@gmail.com>:
>>>>>>
>>>>>>> Canvas is an DOM Element.
>>>>>>> It can render Image Elements to itself in any resolution.
>>>>>>> However it may produce not nice results.
>>>>>>>
>>>>>>> It depends on what you need.
>>>>>>>
>>>>>>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor
>>>>>>> Nobrega wrote:
>>>>>>>>
>>>>>>>> Hi guys,
>>>>>>>>
>>>>>>>> thanks everyone for the answers!
>>>>>>>>
>>>>>>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>>>>>>> itself?
>>>>>>>>
>>>>>>>> Do you have any example of use?
>>>>>>>>
>>>>>>>> Regards
>>>>>&g

Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Is there a way to see what format the file has? If it isn't an image i'll
have to warn the user.

2016-01-25 14:58 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>:

> Hi Alain,
>
> nice code! I am going to do this but in a java version code. I just didn't
> know i could get the image path from a 'value' of the
>
> document.getElementById("fileUpload")
>
> I could even show a image preview to the user before send it to the server!
>
> Or maybe convert the base64 String to byte array, scale it and then send
> to the server :)
>
> Thanks!
>
> 2016-01-25 14:22 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:
>
>> I think what you should to is get the base64  representation of the image
>> from the canvas. Something like
>>
>> var p;var canvas = document.createElement("canvas");
>> var img1=document.createElement("img");
>> function getBase64Image(){
>> p=document.getElementById("fileUpload").value;
>> img1.setAttribute('src', p);
>> canvas.width = img1.width;
>> canvas.height = img1.height;
>> var ctx = canvas.getContext("2d");
>> ctx.drawImage(img1, 0, 0);
>> var dataURL = canvas.toDataURL("image/png");alert("from getbase64 
>> function"+dataURL );
>> return dataURL;}
>>
>> Then send the base64 to the server and corvert it to byterarry or
>> whatever format you need there to save it to disc,
>>
>>
>>
>> On 25 January 2016 at 17:11, Julio Heitor Nobrega <
>> juliohnobr...@gmail.com> wrote:
>>
>>> Hi Alain,
>>>
>>> i am doing exactly that. I am sending the byte array to the server,
>>> saving it as a file in a directory and storing the path in a DB column.
>>>
>>> My problem is to get the byte array from the file (is it possible to get
>>> the byte array using FileUpoad?) and work on it before send to the server.
>>>
>>> 2016-01-25 13:39 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:
>>>
>>>> Would it be a better designer to save the image on disc and just save
>>>> the link to the image to the DB ?
>>>>
>>>> On 25 January 2016 at 15:59, Julio Heitor Nobrega <
>>>> juliohnobr...@gmail.com> wrote:
>>>>
>>>>> As a matter of fact, i am beginning to think that its more wise to
>>>>> send the whole image to the server, scale it using Scalr and store it into
>>>>> the DB.
>>>>>
>>>>> I want to have the control of the image size, test levels of quality.
>>>>> The Scalr has a mode called 'Automatic' that fits your image to the
>>>>> dimensions you pass to it.
>>>>>
>>>>> None of it i will have with GWT Canvas.
>>>>>
>>>>> The only drawback i would get using Scalr is that i will consume more
>>>>> bandwidth DigitalOcean  gives me monthly because i will have to send the
>>>>> whole image to the server.
>>>>>
>>>>> 2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <
>>>>> juliohnobr...@gmail.com>:
>>>>>
>>>>>> Thanks for your answer Greg!
>>>>>>
>>>>>> Actually, i really need a byte array because i will store it in a
>>>>>> BLOB database column.
>>>>>>
>>>>>> Regards!
>>>>>>
>>>>>> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>>>>>>
>>>>>>> Just use context.getCanvas().toDataUrl(); which will return data uri
>>>>>>> with the contents of the canvas. You can use it directly in 
>>>>>>> element or send it to server.
>>>>>>>
>>>>>>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor
>>>>>>> Nobrega wrote:
>>>>>>>>
>>>>>>>> I have just found an example (
>>>>>>>> http://c.gwt-examples.com/home/ui/canvas).
>>>>>>>>
>>>>>>>> The only problem is to convert ImageData to an byte array :)
>>>>>>>>
>>>>>>>> Regards!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <
>>>>>>>> julioh...@gmail.com>:
>>>>>>>>
>>>>>&

Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-14 Thread Julio Heitor Nobrega
Hi guys,

i am trying to upload images with 2mb size but i don't want to send the 
whole original image to the server. 

What i would like to do is reduce the image dimensions from, for example, 
*1000x1000* to *50x50* and reduce the file size
from *2mb* to *~25kb* as well and at the end send the *~25kb* image to the 
server.

I know there is the Scalr framework that does that in java, but its no 
compatible with GWT clients.

Is there any client side GWT library that does the same thing as Scalr?

Best Regards!


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-14 Thread Julio Heitor Nobrega
Hi guys,

thanks everyone for the answers!

Greg,  is Canvas a GWT framework or its a class that belong to GWT itself?

Do you have any example of use?

Regards



Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor Nobrega 
escreveu:
>
> Hi guys,
>
> i am trying to upload images with 2mb size but i don't want to send the 
> whole original image to the server. 
>
> What i would like to do is reduce the image dimensions from, for example, 
> *1000x1000* to *50x50* and reduce the file size
> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to 
> the server.
>
> I know there is the Scalr framework that does that in java, but its no 
> compatible with GWT clients.
>
> Is there any client side GWT library that does the same thing as Scalr?
>
> Best Regards!
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT Compression API

2015-04-13 Thread Julio Heitor Nobrega

Heu guys,

i need to implement a GWT client that compress a image and sends to the 
server. Afterwards, the server sends back the compressed image and then the 
client
descompress it and disply in the screen.

Is there a client-based compression API to be used with GWT?

Best Regards!

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.