mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
10 lines
465 B
TypeScript
10 lines
465 B
TypeScript
import { grayImageFromPacket } from './image-files';
|
|
import { fromData } from './kotlin-data';
|
|
import type { GrayImage } from '../graphics/image';
|
|
declare const FaceclawGraphics: any;
|
|
|
|
export function loadIconImage(path: string, maxWidth: number, maxHeight: number): GrayImage | null {
|
|
const data = FaceclawGraphics.decodeImageFileMaxWidthMaxHeight(path, Math.round(maxWidth), Math.round(maxHeight));
|
|
return data ? grayImageFromPacket(fromData(data)) : null;
|
|
}
|