Skip to content

@mega-yfue/eufy-sdk / decodeImageV2

Function: decodeImageV2()

ts
function decodeImageV2(data): Buffer<ArrayBufferLike> | null;

Decode a v2 blob to a plain JPEG buffer by reconstructing its header, or null if it isn't v2 or the plaintext scan can't be located. The search first chooses subsampling and coarse geometry, derives the fixed MCU count, refines width by row shear, and pins the exact fill height before applying auto-contrast and re-encoding. See the module doc for the keyless-splice rationale.

Parameters

data

Buffer

Returns

Buffer<ArrayBufferLike> | null

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.