/** * Thumbnail Generation for FCM Files * * Brother ScanNCut FCM files contain an embedded thumbnail displayed * in the machine's UI. Invalid thumbnails can cause reboots when * the FCM file is on external media. * * Thumbnail format: * - 88×88 pixels, 1-bit monochrome BMP * - 62-byte BMP header + 1056 bytes pixel data = 1118 bytes total * - Row stride: 12 bytes (88 bits padded to 4-byte boundary) * - BMP is bottom-up (y-flipped) * - White = 1 (background), Black = 0 (paths) */ import { Path } from "./path.js"; /** Thumbnail dimensions */ export declare const THUMBNAIL_SIZE = 88; export declare const THUMBNAIL_ROW_BYTES = 12; export declare const THUMBNAIL_PIXEL_BYTES: number; export declare const THUMBNAIL_TOTAL_BYTES: number; /** Bounding box for paths */ export interface Bounds { minX: number; minY: number; maxX: number; maxY: number; } /** * Calculate bounding box from paths */ export declare function calculateBounds(paths: Path[]): Bounds | null; /** * Generate a blank white thumbnail */ export declare function generateBlankThumbnail(): Uint8Array; /** * Generate thumbnail BMP from paths * * Renders path outlines as black lines on white background. * Paths are scaled to fit within an 80×80 region (4px margin). */ export declare function generateThumbnail(paths: Path[]): Uint8Array; /** * Generate thumbnail from explicit bounds and paths * * Use this when you already know the bounds (e.g., after centering paths) */ export declare function generateThumbnailWithBounds(bounds: Bounds, paths: Path[]): Uint8Array;