-
-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16779d6
commit 296a776
Showing
20 changed files
with
1,034 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// used to auto resizing etc. | ||
export const AUTO = -1; | ||
|
||
// Align modes for cover, contain, bit masks | ||
export const HORIZONTAL_ALIGN_LEFT = 1; | ||
export const HORIZONTAL_ALIGN_CENTER = 2; | ||
export const HORIZONTAL_ALIGN_RIGHT = 4; | ||
|
||
export const VERTICAL_ALIGN_TOP = 8; | ||
export const VERTICAL_ALIGN_MIDDLE = 16; | ||
export const VERTICAL_ALIGN_BOTTOM = 32; | ||
|
||
// blend modes | ||
export const BLEND_SOURCE_OVER = "srcOver"; | ||
export const BLEND_DESTINATION_OVER = "dstOver"; | ||
export const BLEND_MULTIPLY = "multiply"; | ||
export const BLEND_ADD = "add"; | ||
export const BLEND_SCREEN = "screen"; | ||
export const BLEND_OVERLAY = "overlay"; | ||
export const BLEND_DARKEN = "darken"; | ||
export const BLEND_LIGHTEN = "lighten"; | ||
export const BLEND_HARDLIGHT = "hardLight"; | ||
export const BLEND_DIFFERENCE = "difference"; | ||
export const BLEND_EXCLUSION = "exclusion"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import { Jimp as JimpCustom } from "@jimp/core"; | ||
|
||
import crop from "@jimp/plugin-crop"; | ||
|
||
import png from "@jimp/js-png"; | ||
|
||
export const Jimp = JimpCustom.addFormat(png); | ||
export const Jimp = JimpCustom.addFormat(png).plugin(crop); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "@jimp/utils", | ||
"version": "1.0.0", | ||
"repository": "jimp-dev/jimp", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "vitest", | ||
"build": "tshy", | ||
"dev": "tshy --watch" | ||
}, | ||
"author": "Andrew Lisowski <lisowski54@gmail.com>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@jimp/types": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@jimp/config-eslint": "workspace:*", | ||
"@jimp/config-typescript": "workspace:*", | ||
"eslint": "^8.57.0", | ||
"tshy": "^1.12.0", | ||
"typescript": "^5.4.2", | ||
"vitest": "^1.4.0" | ||
}, | ||
"tshy": { | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": "./src/index.ts" | ||
} | ||
}, | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"import": { | ||
"types": "./dist/esm/index.d.ts", | ||
"default": "./dist/esm/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/commonjs/index.d.ts", | ||
"default": "./dist/commonjs/index.js" | ||
} | ||
} | ||
}, | ||
"main": "./dist/commonjs/index.js", | ||
"types": "./dist/commonjs/index.d.ts", | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { expect, test } from "vitest"; | ||
|
||
test("adds 1 + 2 to equal 3", () => { | ||
expect(1 + 2).toBe(3); | ||
}); |
Oops, something went wrong.