public static Image createIndexed(int width,int height,int[] palette,byte[] data){
  IndexedImage i=new IndexedImage(width,height,palette,data);
  CodenameOneImplementation impl=Display.impl;
  if (impl.isNativeIndexed()) {
    return new Image(impl.createNativeIndexed(i));
  }
  return i;
}

public static Image createIndexed ( int width , int height , int [ ] palette , byte [ ] data ) { IndexedImage i = new IndexedImage ( width , height , palette , data ) ; CodenameOneImplementation impl = Display . impl ; if ( impl . isNativeIndexed ( ) ) { return new Image ( impl . createNativeIndexed ( i ) ) ; } return i ; }
creates an indexed image with byte data this method may return a native indexed image rather than an instance of the indexedimage class
