2

I'm trying to convert a Bitmap to a Pix. However, manually reading every pixel from the Bitmap and setting it in the Pix is too slow.

Pix pix = new Pix(width, height, depth);
for (int x = 0; x < width; x++) {
    for (int y = 0; y < height; y++) {
        pix.setPixel(x, y, bmp.getPixel(x, y));
    }
}
rmtheis
  • 5,992
  • 12
  • 61
  • 78

1 Answers1

3

Found the solution in the tess-two repo in ReadFile

It is as easy as: Pix pix = ReadFile.readBitmap(bmp);