Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jimp/plugin-print

Package Overview
Dependencies
Maintainers
0
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/plugin-print - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

22

CHANGELOG.md

@@ -0,1 +1,23 @@

# v1.0.3 (Sat Aug 31 2024)
:tada: This release contains work from a new contributor! :tada:
Thank you, Ben McCann ([@benmccann](https://github.com/benmccann)), for all your work!
#### 🐛 Bug Fix
- remove hundreds of unused dependencies [#1302](https://github.com/jimp-dev/jimp/pull/1302) ([@benmccann](https://github.com/benmccann) [@hipstersmoothie](https://github.com/hipstersmoothie))
- Fix build [#1303](https://github.com/jimp-dev/jimp/pull/1303) ([@hipstersmoothie](https://github.com/hipstersmoothie))
#### ⚠️ Pushed to `main`
- add clean script ([@hipstersmoothie](https://github.com/hipstersmoothie))
#### Authors: 2
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
- Ben McCann ([@benmccann](https://github.com/benmccann))
---
# v1.0.2 (Sat Aug 31 2024)

@@ -2,0 +24,0 @@

20

dist/commonjs/index.d.ts

@@ -96,21 +96,3 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core";

*/
print<I extends JimpClass>(image: I, { font, ...options }: {
x: number;
y: number;
text: (string | number | {
text: string | number;
alignmentX?: HorizontalAlign | undefined;
alignmentY?: VerticalAlign | undefined;
}) & (string | number | {
text: string | number;
alignmentX?: HorizontalAlign | undefined;
alignmentY?: VerticalAlign | undefined;
} | undefined);
maxWidth?: number | undefined;
maxHeight?: number | undefined;
cb?: ((args_0: {
x: number;
y: number;
}) => unknown) | undefined;
} & {
print<I extends JimpClass>(image: I, { font, ...options }: PrintOptions & {
/** the BMFont instance */

@@ -117,0 +99,0 @@ font: BmFont<I>;

@@ -1,2 +0,1 @@

/// <reference types="node" />
import { BmCharacter, BmKerning, BmFont, BmCommonProps } from "./types.js";

@@ -3,0 +2,0 @@ /**

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.loadBitmapFont = void 0;
exports.loadBitmapFont = loadBitmapFont;
const parse_bmfont_ascii_1 = __importDefault(require("parse-bmfont-ascii"));

@@ -73,3 +73,2 @@ const parse_bmfont_xml_1 = __importDefault(require("parse-bmfont-xml"));

}
exports.loadBitmapFont = loadBitmapFont;
//# sourceMappingURL=load-bitmap-font.js.map

@@ -1,2 +0,1 @@

/// <reference types="node" />
/**

@@ -21,45 +20,45 @@ * Loads a Bitmap Font from a file.

background: number;
formats: import("@jimp/types").Format<any, undefined>[];
formats: import("@jimp/types").Format<any>[];
inspect(): string;
toString(): string;
getBuffer<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<Buffer>;
getBase64<ProvidedMimeType_1 extends "image/png", Options_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
getBase64<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<string>;
write<Extension extends string, Mime extends Record<"png", "image/png"> extends infer T ? T extends Record<"png", "image/png"> ? T extends Record<Extension, infer M> ? M : never : never : never, Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T_1 ? T_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_1 extends Record<ProvidedMimeType_1, infer O> ? O : never : never : never>(mime: ProvidedMimeType_1, options?: Options_1 | undefined): Promise<string>;
write<Extension extends string, Mime extends Record<"png", "image/png"> extends infer T_2 ? T_2 extends Record<"png", "image/png"> ? T_2 extends Record<Extension, infer M> ? M : never : never : never, Options_2 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_3 ? T_3 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_3 extends Record<Mime, infer O> ? O : never : never : never>(path: `${string}.${Extension}`, options?: Options_2 | undefined): Promise<void>;
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T_1 extends Record<Mime, infer O> ? O : never : never : never>(path: `${string}.${Extension}`, options?: Options | undefined): Promise<void>;
clone<S extends unknown>(this: S): S;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge | undefined): number;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge): number;
getPixelColor(x: number, y: number): number;
setPixelColor(hex: number, x: number, y: number): any;
hasAlpha(): boolean;
composite<I extends unknown>(src: I, x?: number | undefined, y?: number | undefined, options?: {
mode?: import("@jimp/core").BlendMode | undefined;
opacitySource?: number | undefined;
opacityDest?: number | undefined;
} | undefined): any;
composite<I extends unknown>(src: I, x?: number, y?: number, options?: {
mode?: import("@jimp/core").BlendMode;
opacitySource?: number;
opacityDest?: number;
}): any;
scan(f: (x: number, y: number, idx: number) => any): any;
scan(x: number, y: number, w: number, h: number, cb: (x: number, y: number, idx: number) => any): any;
scanIterator(x?: number | undefined, y?: number | undefined, w?: number | undefined, h?: number | undefined): Generator<{
scanIterator(x?: number, y?: number, w?: number, h?: number): Generator<{
x: number;

@@ -73,45 +72,45 @@ y: number;

background: number;
formats: import("@jimp/types").Format<any, undefined>[];
formats: import("@jimp/types").Format<any>[];
inspect(): string;
toString(): string;
getBuffer<ProvidedMimeType_2 extends "image/png", Options_3 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_4 ? T_4 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_4 extends Record<ProvidedMimeType_2, infer O> ? O : never : never : never>(mime: ProvidedMimeType_2, options?: Options_3 | undefined): Promise<Buffer>;
getBase64<ProvidedMimeType_1_1 extends "image/png", Options_1_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_5 ? T_5 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_5 extends Record<ProvidedMimeType_1_1, infer O> ? O : never : never : never>(mime: ProvidedMimeType_1_1, options?: Options_1_1 | undefined): Promise<string>;
write<Extension_1 extends string, Mime_1 extends Record<"png", "image/png"> extends infer T_6 ? T_6 extends Record<"png", "image/png"> ? T_6 extends Record<Extension_1, infer M> ? M : never : never : never, Options_2_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_7 ? T_7 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_7 extends Record<Mime_1, infer O> ? O : never : never : never>(path: `${string}.${Extension_1}`, options?: Options_2_1 | undefined): Promise<void>;
clone<S_1 extends unknown>(this: S_1): S_1;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge | undefined): number;
getBuffer<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<Buffer>;
getBase64<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<string>;
write<Extension extends string, Mime extends Record<"png", "image/png"> extends infer T ? T extends Record<"png", "image/png"> ? T extends Record<Extension, infer M> ? M : never : never : never, Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T_1 ? T_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T_1 extends Record<Mime, infer O> ? O : never : never : never>(path: `${string}.${Extension}`, options?: Options | undefined): Promise<void>;
clone<S extends unknown>(this: S): S;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge): number;
getPixelColor(x: number, y: number): number;
setPixelColor(hex: number, x: number, y: number): any;
hasAlpha(): boolean;
composite<I_1 extends unknown>(src: I_1, x?: number | undefined, y?: number | undefined, options?: {
mode?: import("@jimp/core").BlendMode | undefined;
opacitySource?: number | undefined;
opacityDest?: number | undefined;
} | undefined): any;
composite<I extends unknown>(src: I, x?: number, y?: number, options?: {
mode?: import("@jimp/core").BlendMode;
opacitySource?: number;
opacityDest?: number;
}): any;
scan(f: (x: number, y: number, idx: number) => any): any;
scan(x: number, y: number, w: number, h: number, cb: (x: number, y: number, idx: number) => any): any;
scanIterator(x?: number | undefined, y?: number | undefined, w?: number | undefined, h?: number | undefined): Generator<{
scanIterator(x?: number, y?: number, w?: number, h?: number): Generator<{
x: number;

@@ -118,0 +117,0 @@ y: number;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.loadFont = void 0;
exports.loadFont = loadFont;
const load_bitmap_font_js_1 = require("./load-bitmap-font.js");

@@ -42,3 +42,2 @@ const core_1 = require("@jimp/core");

}
exports.loadFont = loadFont;
//# sourceMappingURL=load-font.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.measureTextHeight = exports.splitLines = exports.measureText = void 0;
exports.measureText = measureText;
exports.splitLines = splitLines;
exports.measureTextHeight = measureTextHeight;
function measureText(font, text) {

@@ -20,3 +22,2 @@ let x = 0;

}
exports.measureText = measureText;
function splitLines(font, text, maxWidth) {

@@ -47,3 +48,2 @@ const words = text.replace(/[\r\n]+/g, " \n").split(" ");

}
exports.splitLines = splitLines;
function measureTextHeight(font, text, maxWidth) {

@@ -53,3 +53,2 @@ const { lines } = splitLines(font, text, maxWidth);

}
exports.measureTextHeight = measureTextHeight;
//# sourceMappingURL=measure-text.js.map
{
"type": "commonjs",
"publishConfig": {
"access": "public"
},
"sideEffects": false
}
"type": "commonjs"
}

@@ -96,21 +96,3 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core";

*/
print<I extends JimpClass>(image: I, { font, ...options }: {
x: number;
y: number;
text: (string | number | {
text: string | number;
alignmentX?: HorizontalAlign | undefined;
alignmentY?: VerticalAlign | undefined;
}) & (string | number | {
text: string | number;
alignmentX?: HorizontalAlign | undefined;
alignmentY?: VerticalAlign | undefined;
} | undefined);
maxWidth?: number | undefined;
maxHeight?: number | undefined;
cb?: ((args_0: {
x: number;
y: number;
}) => unknown) | undefined;
} & {
print<I extends JimpClass>(image: I, { font, ...options }: PrintOptions & {
/** the BMFont instance */

@@ -117,0 +99,0 @@ font: BmFont<I>;

@@ -1,2 +0,1 @@

/// <reference types="node" resolution-mode="require"/>
import { BmCharacter, BmKerning, BmFont, BmCommonProps } from "./types.js";

@@ -3,0 +2,0 @@ /**

@@ -1,2 +0,1 @@

/// <reference types="node" resolution-mode="require"/>
/**

@@ -21,45 +20,45 @@ * Loads a Bitmap Font from a file.

background: number;
formats: import("@jimp/types").Format<any, undefined>[];
formats: import("@jimp/types").Format<any>[];
inspect(): string;
toString(): string;
getBuffer<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<Buffer>;
getBase64<ProvidedMimeType_1 extends "image/png", Options_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
getBase64<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<string>;
write<Extension extends string, Mime extends Record<"png", "image/png"> extends infer T ? T extends Record<"png", "image/png"> ? T extends Record<Extension, infer M> ? M : never : never : never, Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T_1 ? T_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_1 extends Record<ProvidedMimeType_1, infer O> ? O : never : never : never>(mime: ProvidedMimeType_1, options?: Options_1 | undefined): Promise<string>;
write<Extension extends string, Mime extends Record<"png", "image/png"> extends infer T_2 ? T_2 extends Record<"png", "image/png"> ? T_2 extends Record<Extension, infer M> ? M : never : never : never, Options_2 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_3 ? T_3 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_3 extends Record<Mime, infer O> ? O : never : never : never>(path: `${string}.${Extension}`, options?: Options_2 | undefined): Promise<void>;
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T_1 extends Record<Mime, infer O> ? O : never : never : never>(path: `${string}.${Extension}`, options?: Options | undefined): Promise<void>;
clone<S extends unknown>(this: S): S;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge | undefined): number;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge): number;
getPixelColor(x: number, y: number): number;
setPixelColor(hex: number, x: number, y: number): any;
hasAlpha(): boolean;
composite<I extends unknown>(src: I, x?: number | undefined, y?: number | undefined, options?: {
mode?: import("@jimp/core").BlendMode | undefined;
opacitySource?: number | undefined;
opacityDest?: number | undefined;
} | undefined): any;
composite<I extends unknown>(src: I, x?: number, y?: number, options?: {
mode?: import("@jimp/core").BlendMode;
opacitySource?: number;
opacityDest?: number;
}): any;
scan(f: (x: number, y: number, idx: number) => any): any;
scan(x: number, y: number, w: number, h: number, cb: (x: number, y: number, idx: number) => any): any;
scanIterator(x?: number | undefined, y?: number | undefined, w?: number | undefined, h?: number | undefined): Generator<{
scanIterator(x?: number, y?: number, w?: number, h?: number): Generator<{
x: number;

@@ -73,45 +72,45 @@ y: number;

background: number;
formats: import("@jimp/types").Format<any, undefined>[];
formats: import("@jimp/types").Format<any>[];
inspect(): string;
toString(): string;
getBuffer<ProvidedMimeType_2 extends "image/png", Options_3 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_4 ? T_4 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_4 extends Record<ProvidedMimeType_2, infer O> ? O : never : never : never>(mime: ProvidedMimeType_2, options?: Options_3 | undefined): Promise<Buffer>;
getBase64<ProvidedMimeType_1_1 extends "image/png", Options_1_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_5 ? T_5 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_5 extends Record<ProvidedMimeType_1_1, infer O> ? O : never : never : never>(mime: ProvidedMimeType_1_1, options?: Options_1_1 | undefined): Promise<string>;
write<Extension_1 extends string, Mime_1 extends Record<"png", "image/png"> extends infer T_6 ? T_6 extends Record<"png", "image/png"> ? T_6 extends Record<Extension_1, infer M> ? M : never : never : never, Options_2_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> extends infer T_7 ? T_7 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType | undefined;
colorType?: import("@jimp/js-png").PNGColorType | undefined;
inputColorType?: import("@jimp/js-png").PNGColorType | undefined;
}> ? T_7 extends Record<Mime_1, infer O> ? O : never : never : never>(path: `${string}.${Extension_1}`, options?: Options_2_1 | undefined): Promise<void>;
clone<S_1 extends unknown>(this: S_1): S_1;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge | undefined): number;
getBuffer<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<Buffer>;
getBase64<ProvidedMimeType extends "image/png", Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T ? T extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T extends Record<ProvidedMimeType, infer O> ? O : never : never : never>(mime: ProvidedMimeType, options?: Options | undefined): Promise<string>;
write<Extension extends string, Mime extends Record<"png", "image/png"> extends infer T ? T extends Record<"png", "image/png"> ? T extends Record<Extension, infer M> ? M : never : never : never, Options extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> extends infer T_1 ? T_1 extends Record<"image/png", Omit<import("@jimp/js-png").PNGJSOptions, "filterType" | "colorType" | "inputColorType"> & {
filterType?: import("@jimp/js-png").PNGFilterType;
colorType?: import("@jimp/js-png").PNGColorType;
inputColorType?: import("@jimp/js-png").PNGColorType;
}> ? T_1 extends Record<Mime, infer O> ? O : never : never : never>(path: `${string}.${Extension}`, options?: Options | undefined): Promise<void>;
clone<S extends unknown>(this: S): S;
getPixelIndex(x: number, y: number, edgeHandling?: import("@jimp/types").Edge): number;
getPixelColor(x: number, y: number): number;
setPixelColor(hex: number, x: number, y: number): any;
hasAlpha(): boolean;
composite<I_1 extends unknown>(src: I_1, x?: number | undefined, y?: number | undefined, options?: {
mode?: import("@jimp/core").BlendMode | undefined;
opacitySource?: number | undefined;
opacityDest?: number | undefined;
} | undefined): any;
composite<I extends unknown>(src: I, x?: number, y?: number, options?: {
mode?: import("@jimp/core").BlendMode;
opacitySource?: number;
opacityDest?: number;
}): any;
scan(f: (x: number, y: number, idx: number) => any): any;
scan(x: number, y: number, w: number, h: number, cb: (x: number, y: number, idx: number) => any): any;
scanIterator(x?: number | undefined, y?: number | undefined, w?: number | undefined, h?: number | undefined): Generator<{
scanIterator(x?: number, y?: number, w?: number, h?: number): Generator<{
x: number;

@@ -118,0 +117,0 @@ y: number;

{
"type": "module",
"publishConfig": {
"access": "public"
},
"sideEffects": false
}
"type": "module"
}
{
"name": "@jimp/plugin-print",
"version": "1.0.2",
"version": "1.0.3",
"repository": "jimp-dev/jimp",

@@ -10,3 +10,4 @@ "sideEffects": false,

"build": "tshy",
"dev": "tshy --watch"
"dev": "tshy --watch",
"clean": "rm -rf node_modules .tshy .tshy-build dist .turbo"
},

@@ -16,9 +17,10 @@ "author": "Andrew Lisowski <lisowski54@gmail.com>",

"devDependencies": {
"@jimp/config-eslint": "1.0.2",
"@jimp/config-typescript": "1.0.2",
"@jimp/config-eslint": "1.0.3",
"@jimp/config-typescript": "1.0.3",
"@jimp/js-png": "workspace:*",
"@jimp/test-utils": "1.0.2",
"@jimp/test-utils": "1.0.3",
"@types/node": "^20.12.5",
"eslint": "^8.57.0",
"tshy": "^1.12.0",
"typescript": "^5.4.2",
"typescript": "^5.5.4",
"vitest": "^1.4.0"

@@ -74,8 +76,7 @@ },

"dependencies": {
"@jimp/core": "1.0.2",
"@jimp/js-jpeg": "1.0.2",
"@jimp/js-png": "1.0.2",
"@jimp/plugin-blit": "1.0.2",
"@jimp/types": "1.0.2",
"@jimp/utils": "1.0.2",
"@jimp/core": "1.0.3",
"@jimp/js-jpeg": "1.0.3",
"@jimp/js-png": "1.0.3",
"@jimp/plugin-blit": "1.0.3",
"@jimp/types": "1.0.3",
"parse-bmfont-ascii": "^1.0.6",

@@ -89,3 +90,3 @@ "parse-bmfont-binary": "^1.0.6",

},
"gitHead": "5e52bfd76c68b45db3a7a2ed8450e47f1fcf8853"
"gitHead": "4b35cc0866903bc9e5d48d31ca34fcbec9ab111f"
}

@@ -96,3 +96,3 @@ import { expect, test, describe } from "vitest";

const font = await loadFont(
"https://raw.githubusercontent.com/jimp-dev/jimp/main/packages/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"
"https://raw.githubusercontent.com/jimp-dev/jimp/main/plugins/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"
);

@@ -99,0 +99,0 @@ const image = new Jimp({ width: 300, height: 100, color: 0xff8800ff });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc