alpha-mask
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

README.md

merge source.png with mask.png to alpha.png

install

yarn add alpha-mask

demo

image_1

=>

image

code

import { createWriteStream, pathExistsSync, ensureWriteStream, outputFile } from 'fs-iconv';
import { mergeMaskByFile, generateAsync, outputAsync } from 'alpha-mask';
import FastGlob from '@bluelovers/fast-glob/bluebird';
import * as path from 'path';
 
mergeMaskByFile(path.join(__dirname, './res/char_002_amiya_2.png'), path.join(__dirname, './res/char_002_amiya_2[alpha].png'))
.then(img => {
    return outputAsync(path.join(__dirname, 'out.png'), img)
})
;

out.png

Package Sidebar

Install

npm i alpha-mask

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

28.4 kB

Total Files

14

Last publish

Collaborators

  • bluelovers