Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtractInfoResultImage type missing optional 'colormap' property. #116

Open
zacharyarney opened this issue Apr 14, 2021 · 0 comments
Open

Comments

@zacharyarney
Copy link

Some images contain a colormap property of type string[] which contains a list of all colors present in the image. This property, when it exists, is inaccessible when using TypeScript without retyping the ExtractInfoResultImage to any.

Quick fix would be to add it as an optional property to the ExtractInfoResultImage interface in src/util/imageExtractInfoTypes.d.ts (shown here added at the bottom, is this doable?):

export interface ExtractInfoResultImage {
    name: string;
    baseName: string;
    format: string;
    formatDescription: string;
    mimeType: string;
    class: string;
    geometry: ExtractInfoResultGeometry;
    resolution: ExtractInfoResultResolution;
    printSize: ExtractInfoResultPrintSize;
    units: string;
    type: string;
    baseType: string;
    endianess: string;
    colorspace: string;
    depth: number;
    baseDepth: number;
    channelDepth: ExtractInfoResultChannelDepth;
    pixels: number;
    imageStatistics: ExtractInfoResultImageStatistics;
    channelStatistics: ExtractInfoResultChannelStatistics;
    alpha: string;
    renderingIntent: string;
    gamma: number;
    chromaticity: ExtractInfoResultChromaticity;
    matteColor: string;
    backgroundColor: string;
    borderColor: string;
    transparentColor: string;
    interlace: string;
    intensity: string;
    compose: string;
    pageGeometry: ExtractInfoResultPageGeometry;
    dispose: string;
    iterations: number;
    compression: string;
    orientation: string;
    properties: ExtractInfoResultProperties;
    profiles: ExtractInfoResultProfiles;
    tainted: boolean;
    filesize: string;
    numberPixels: string;
    pixelsPerSecond: string;
    userTime: string;
    elapsedTime: string;
    version: string;
    colormap?: string[];     <<<<<<
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant