Skip to main content
Home

latest

和图像操作相关的工具,比如获取图片的Base64字符串。

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a year ago (0.1.1)

函数列表

unit 说明
getImageBase64 获取图片的Base64编码

Examples

first new a ts file named test.ts.

import { getImageBase64 } from "jsr:@xtool/image";

console.log(getImageBase64('./test.jpg'));

then run the below command:

$ deno run test.ts

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@xtool/image

Import symbol

import * as image from "@xtool/image";
or

Import directly with a jsr specifier

import * as image from "jsr:@xtool/image";

Add Package

pnpm i jsr:@xtool/image
or (using pnpm 10.8 or older)
pnpm dlx jsr add @xtool/image

Import symbol

import * as image from "@xtool/image";

Add Package

yarn add jsr:@xtool/image
or (using Yarn 4.8 or older)
yarn dlx jsr add @xtool/image

Import symbol

import * as image from "@xtool/image";

Add Package

vlt install jsr:@xtool/image

Import symbol

import * as image from "@xtool/image";

Add Package

npx jsr add @xtool/image

Import symbol

import * as image from "@xtool/image";

Add Package

bunx jsr add @xtool/image

Import symbol

import * as image from "@xtool/image";