Coder Social home page Coder Social logo

jimp-compact's Introduction

✏️ Jimp Compact

npm version npm downloads install size

Lightweight version of Jimp compiled with vercel/ncc

Why?

This package has 27x smaller install size with all features of original jimp (Jimp install size is ~33.8MB) by bundling all node_modules and removing extra files.

Usage

Install and import/require jimp-compact instead of jimp npm package.

# npm
npm i jimp-compact

# yarn
yarn add jimp-compact
// ESM
import Jimp from 'jimp-compact'

// CJS
const Jimp = require('jimp-compact')

See jimp docs for full usage.

Known Issues

In order to make typescript working, you need to (also) install jimp in devDependencies! Track issue via #39 and #42.

License

MIT - Based on Jimp

jimp-compact's People

Contributors

nozomuikuta avatar pi0 avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jimp-compact's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

circleci
.circleci/config.yml
npm
package.json
  • @types/fs-extra ^9.0.13
  • @types/jimp ^0.2.28
  • @vercel/ncc ^0.34.0
  • fs-extra ^10.1.0
  • jimp ^0.16.2
  • jiti ^1.16.0
  • typescript ^4.9.3

  • Check this box to trigger a request for Renovate to run again on this repository

Written file is many times larger than the original?

Hi, I have a problem, namely that the image written by Jimp-compact is many times larger than the original.
Here is my original file, which is slightly larger than 1MB.
Screenshot_1

The buffer length is also OK so far:
Screenshot_2

Now, however, as soon as I read in the file using Jimp, very questionable buffer sizes are coming up:
Screenshot_3

Thus, the written file then has a size of over 7MB, which is pretty much 7x the size of the original:
Screenshot_4

I am now wondering how this can be, unfortunately the documentation of jimp is not really informative in terms of options and customization of processes, so I hope someone here can help me.

Thanks in advance!

Missing bundled fonts

// file.js
const {existsSync} = require('fs')
const Jimp = require('jimp');
const JimpCompact = require('jimp-compact');

console.log(existsSync(Jimp.FONT_SANS_16_BLACK))
console.log(existsSync(JimpCompact.FONT_SANS_16_BLACK))

prints

$ node file.js
true
false

specifically, this fails for Jimp.loadFont

benchmark?

This library looks promising and a good alternative to the very heavy jimp; however, will desirable to have some benchmark for comparison to see if the switch is worth for a perf point of view 🙂

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.