Skip to content

adri326/rexpaintjs-render

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rexpaintjs-render

Renders rexpaintjs-fork Images into canvas images.

Installation

Install this module by running:

npm install --save adri326/rexpaintjs-render

Then, import the node module:

const render = require('rexpaintjs-render');

You can then quickly convert your Images into Image instances with the imported render method:

const fs = require("fs");

let buffer = fs.readFileSync("your_file.xp");
rexpaint(buffer, (err, data) => {
  if (err) {
    throw new Error(err);
  }
  render(data, {output: "your_file.png"}); // writes the image to `your_file.png`!
});

Changelog

  • 1.0.0:
    • Switch from canvas to @napi-rs/canvas, as canvas has been failing to compile on node>=22.11.0 for several months.
    • Remove Image.render(options), use render(image, options) instead.
    • Add typescript types through JSDoc. These require rexpaintjs-fork>=0.2.6 and @types/node to work properly.
    • Fix default background colors being passed as numbers to canvas.
    • Fix render() crashing if the image has no layers.
  • 0.3.0: switch to canvas for better performance

About

Renders rexpaintjs-fork images into jimp images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published