i'm trying to port one class from java to B4A. I'm not to sure how i should handle the "new" for creating a new array. Here's the Java Code:
B4X:
public class image
{
public int _w, _h;
public int class_pixels[]; <----------------------- undefinded array size
...
public myimage( Image img, int force_depth, Applet a )
{
int x, y, i;
_w = img.getWidth(a);
_h = img.getHeight(a);
class_pixels = new int [ _w * _h ]; <---------------- how do i do that in B4A?
...
}
} // end of class
I know how to handle the Image Stuff (via Bitmap) but i'm unsure how to translate the lines marked with "<------------"
:sign0163: