Skip to content

Commit

Permalink
chore: switch upng-js to lib-upng
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Dec 24, 2019
1 parent cd205b9 commit bc09c73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"dependencies": {
"is-png": "2.0.0",
"upng-js": "2.1.0"
"lib-upng": "1.0.0"
},
"devDependencies": {
"@babel/cli": "7.7.7",
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import UPNG from 'upng-js'
import {decode, encode, toRGBA8} from 'lib-upng'
import isPng from 'is-png'

function process(options) {
Expand All @@ -16,11 +16,11 @@ function process(options) {
return input
}

const img = UPNG.decode(input)
const img = decode(input)

const output = Buffer.from(
UPNG.encode(
UPNG.toRGBA8(img),
encode(
toRGBA8(img),
img.width,
img.height,
options.cnum,
Expand Down

0 comments on commit bc09c73

Please sign in to comment.