photopea / UPNG.js

Fast and advanced PNG (APNG) decoder and encoder (lossy / lossless)
MIT License
2.1k stars 259 forks source link

UPNG.encodeLL is not a function #32

Closed HRK44 closed 5 years ago

HRK44 commented 5 years ago

You have the function encodeLL() in the docs, but I can't use it. Doesn't seem to be in the source code...

photopea commented 5 years ago

It is on the line 399.

photopea commented 5 years ago

@Scimonster I think the NPM version of UPNG.js is outdated, could you please update it?

mootari commented 5 years ago

The latest version available on npm was released in December 2017. Changes made since then include the addition of encodeLL and docs for quantize.

photopea commented 5 years ago

@mootari can you upload the latest UPNG.js to NPM? You can make it separately, I will update the link in our README.md

mootari commented 5 years ago

@Scimonster you're listed as having access to the package. Could you please publish a new release?

@photopea I'd rather not, because the update wouldn't propagate and because I don't feel comfortable managing a package for which I don't maintain the code.

mn4367 commented 5 years ago

Before releasing a new version on NPM some lines would have to be (re-)added which were missing in the last commit:

Instead of

var UPNG = {};

at the begin of the file it should be

;(function(){
var UPNG = {};

// Make available for import by `require()`
var pako;
if (typeof module == "object") {module.exports = UPNG;}  else {window.UPNG = UPNG;}
if (typeof require == "function") {pako = require("pako");}  else {pako = window.pako;}
function log() { if (typeof process=="undefined" || process.env.NODE_ENV=="development") console.log.apply(console, arguments);  }
(function(UPNG, pako){

and at the end of the file

})(UPNG, pako);
})();

is missing.

tiagoskaneta commented 5 years ago

any update on this? it would be good to have the updated version on npm.

photopea commented 5 years ago

@tiagoskaneta Could you put it on NPM yourself and give us a link?

I really dont like redundancy (having to publish and update the same thing at two different places). I do not use NPM. Why dont you just copy-paste it from here?

tiagoskaneta commented 5 years ago

@photopea if it's not done by the project contributors then it would be only a temporary solution. As it would be out of sync after any updates you make.

In any case, thank you for the hard work.