benilla-re systems structs docs

ResampleImage

function · gxumath · unreached

Address
0x5c51f0 · 339 bytes, up to 0x5c5342
Signature
void __fastcall (const void *src, int sfmt, uint32_t sw, uint32_t sh, uint32_t spitch, void *dst, int dfmt, uint32_t dw, uint32_t dh, uint32_t dpitch)
Meaning
Copies an image to another size by nearest source element, stepping in 16.16 fixed point
Confidence
verified, proof one
Finding
gxumath#image-resample

Finding: Image resample in gxumath

0x5c51f0 (ecx the source, edx its format; source width, height and pitch, the destination, its format, width, height and pitch on the stack; ret 0x20) copies an image to another size. Both formats must be below 9 as signed integers and both pointers nonzero, else error 0x57. stepX = (srcW << 16)/dstW and stepY = (srcH << 16)/dstH, unsigned divides, so a zero destination size faults. Destination row r, column c takes the source element at row `(r·stepY)

16and column(c·stepX) >> 16`. The element is 4 bytes when both formats are 1, otherwise 2.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.