Yes, that was the reason, thank you. It works now.

El sábado, 15 de mayo de 2021 a las 7:44:30 UTC+2, Shai Almog escribió:

> I'm not sure why this will happen but the code has a problem either way. 
> flip will happen immediately and will lose the URLImage aspect of the 
> image. So if the image isn't downloaded yet it will do it on the 
> placeholder and the image won't download.
> Would this exception happen if you do 
> imagenCargandoPortada.flipHorizontally(true)?
>
> On Friday, May 14, 2021 at 2:44:32 PM UTC+3 [email protected] wrote:
>
>> EncodedImage imagenCargandoPortada = (EncodedImage) 
>> fetchResourceFile().getImage("magazineEscala.png");;
>> Image roundMask = Image.createImage(imagenCargandoPortada.getWidth(), 
>> imagenCargandoPortada.getHeight(), 0xff000000);
>> Graphics gr = roundMask.getGraphics();
>> gr.setColor(0xffffff);
>> gr.setAntiAliased(true);
>> gr.fillRoundRect(0, 0, imagenCargandoPortada.getWidth(), 
>> imagenCargandoPortada.getHeight(), 60, 60);
>> URLImage.ImageAdapter ada = URLImage.createMaskAdapter(roundMask);       
>>                          
>> URLImage imagen = URLImage.createToFileSystem(imagenCargandoPortada
>>          , directory
>>          , urlAdress
>>          , ada);
>> Image imgFlip = imagen.flipHorizontally(true);
>>
>> El viernes, 14 de mayo de 2021 a las 5:38:46 UTC+2, Shai Almog escribió:
>>
>>> What type of image are you trying to do this on?
>>> How did you create the image object?
>>> Can you attach it here?
>>>
>>> On Thursday, May 13, 2021 at 11:12:31 PM UTC+3 [email protected] wrote:
>>>
>>>> This is the output:
>>>>
>>>> java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
>>>> at 
>>>> java.desktop/sun.awt.image.ByteInterleavedRaster.getDataElements(ByteInterleavedRaster.java:313)
>>>> at 
>>>> java.desktop/java.awt.image.BufferedImage.getRGB(BufferedImage.java:986)
>>>> at com.codename1.impl.javase.JavaSEPort.getRGB(JavaSEPort.java:5605)
>>>> at com.codename1.ui.Image.getRGB(Image.java:790)
>>>> at com.codename1.ui.EncodedImage.getRGB(EncodedImage.java:557)
>>>> at com.codename1.ui.Image.getRGBImpl(Image.java:865)
>>>> at com.codename1.ui.Image.getRGB(Image.java:824)
>>>> at 
>>>> com.codename1.impl.CodenameOneImplementation.flipImageHorizontally(CodenameOneImplementation.java:997)
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/2ff0ef99-0557-46d4-a411-ff4f6624c73fn%40googlegroups.com.

Reply via email to