Skip to content

@halone/sdk / splitMpo

Function: splitMpo() ​

ts
function splitMpo<T>(bytes): [Uint8Array<T>, Uint8Array<T>] | null;

Splits a Multi-Picture Object (.mpo, as a Nintendo 3DS or a Fujifilm W3 saves a stereo photo) into its first two JPEGs: left eye, then right. Reads the MP index in the first picture's APP2 segment; failing that, looks for the second picture's start right after the first one's end. Null when the file holds a single picture.

Type Parameters ​

T ​

T extends ArrayBufferLike

Parameters ​

bytes ​

Uint8Array<T>

Returns ​

[Uint8Array<T>, Uint8Array<T>] | null

Released under the MIT License.