// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
import { estimateObjectSize } from "@foxglove/studio-base/players/messageMemoryEstimation.js";
import { fromMillis } from "../../utils";
export function deserializeMonoFrame(args) {
    const { topic, message } = args;
    const receiveTime = fromMillis(Date.now());
    const foxgloveMessage = {
        timestamp: receiveTime,
        frame_id: `mono-${topic}-frame`,
        width: message.width,
        height: message.height,
        encoding: "mono8",
        step: message.width,
        data: message.data
    };
    return [
        {
            topic,
            receiveTime,
            message: foxgloveMessage,
            sizeInBytes: estimateObjectSize(foxgloveMessage),
            schemaName: "foxglove.RawImage"
        }
    ];
}
//# sourceMappingURL=mono.js.map