Print image on LX300+II Matrix ESC/P printer using Java / Android

I'm plugging a printer LX300+II via cable USB directly into a mobile device Android, I can print text normally, as I already have a little experience in printers ESC/POS, I tried to adapt a part of the code to print on it, without success. As if the amount of pixels per line were different. Has anyone been through this? It follows the code I tried to adapt.

    byte[] _data = Base64.decode(logoBase64, Base64.DEFAULT);
    Bitmap bmp = BitmapFactory.decodeByteArray(_data, 0, _data.length);
    convertBitmap(bmp); //converte as cores para preto. 
    byte[] rtn = new byte[0];

    rtn = concat(rtn , new byte[] {0x1B, 0x33, 24});
    int offset = 0;
    while (offset < bmp.getHeight()) {
        rtn = concat(rtn , new byte[] {0x1B, 0x2A, (byte)33, (byte)255, (byte)3});
        for (int x = 0; x < bmp.getWidth(); ++x) {
            for (int k = 0; k < 3; ++k) {
                byte slice = 0;
                for (int b = 0; b < 8; ++b) {
                    int y = (((offset / 8) + k) * 8) + b;
                    int i = (y * bmp.getWidth()) + x;
                    boolean v = false;
                    if (i < dots.length()) {
                        v = dots.get(i);
                    }
                    slice |= (byte) ((v ? 1 : 0) << (7 - b));
                }
                rtn = concat(rtn , new byte[] {slice});
            }
        }
        offset += 24;
        rtn = concat(rtn , new byte[] {10});
    }
    return rtn;
Author: Maniero, 2019-02-04