RRowChisel
Product

Product features · Aligned RGB24 row offsets

01

Inspect bitmap_rows.py for row padding and storage orientation before using its byte offset in an image reader.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Aligned RGB24 row offsets

● ● ●RowChisel●
A concrete starting point · Aligned RGB24 row offsets ×
def bitmap_row_offset(width, height, row, top_down=False):
    if any(type(v) is not int for v in (width, height, row)) or type(top_down) is not bool:
        raise ValueError("bitmap.type")
    if not 1 <= width <= 4096 or not 1 <= height <= 4096 or not 0 <= row < height:
        raise ValueError("bitmap.range")
    stride = ((3*width+3)//4)*4
    physical_row = row if top_down else height-1-row
    return physical_row*stride, stride
✳Aligned RGB24 row offsets
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗