geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
public byte[] drawTileBytes(int x, int y, int zoom) {

        Bitmap bitmap = drawTile(x, y, zoom);

        byte[] tileData = null;

        // Convert the bitmap to bytes
        if (bitmap != null) {
            try {
                tileData = BitmapConverter.toBytes(
                        bitmap, compressFormat);
            } catch (IOException e) {
                Log.e(FeatureTiles.class.getSimpleName(), "Failed to create tile. x: " + x + ", y: "
                        + y + ", zoom: " + zoom, e);
            } finally {
                bitmap.recycle();
            }
        }

        return tileData;
    }
public byte[] drawTileBytes(int x, int y, int zoom) {

        Bitmap bitmap = drawTile(x, y, zoom);

        byte[] tileData = null;

        // Convert the bitmap to bytes
        if (bitmap != null) {
            try {
                tileData = BitmapConverter.toBytes(
                        bitmap, compressFormat);
            } catch (IOException e) {
                Log.e(FeatureTiles.class.getSimpleName(), "Failed to create tile. x: " + x + ", y: "
                        + y + ", zoom: " + zoom, e);
            } finally {
                bitmap.recycle();
            }
        }

        return tileData;
    }
public byte [ ] drawTileBytes ( int x , int y , int zoom ) { Bitmap bitmap = drawTile ( x , y , zoom ) ; byte [ ] tileData = null ; // Convert the bitmap to bytes if ( bitmap != null ) { try { tileData = BitmapConverter . toBytes ( bitmap , compressFormat ) ; } catch ( IOException e ) { Log . e ( FeatureTiles . class . getSimpleName ( ) , "Failed to create tile. x: " + x + ", y: " + y + ", zoom: " + zoom , e ) ; } finally { bitmap . recycle ( ) ; } } return tileData ; }
Draw the tile and get the bytes from the x, y, and zoom level

@param x    x coordinate
@param y    y coordinate
@param zoom zoom level
@return tile bytes, or null
Draw the tile and get the bytes from the x y and zoom level