@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