-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
installation failed on Windows #39
Comments
Hi, I never used NPM. @Scimonster could you help us with this? |
hmm That repo is still on my git, so it should work. I'll look into it |
Do you have git installed on your PC? You can check by typing: git in your command prompt. You will need git installed to install that package. |
Sorry I commented with the wrong user. revoyrm is me, the jpgjs fork this uses is mine. Anyway you can download git here --> https://git-scm.com/downloads |
I just installed this module using NPM. |
So earlier there was an issue with JPGJS which is needed for the jpeg decoders. This issue was only for when you were using nodejs. Which if you're doing npm, you are. Jpgjs is a dead project, they dont accept contributions. So i made a fork and fixed it so it would work with nodejs projects. Since I was just fixing it in a fork and it wasn't my original project I didn't release it to npm. So we used to github link in the package.json. I don't know what the etiquette for releasing projects that are just Forks to npm but I will look into it. That said it will be a lot quicker for you to just install git. The installer I linked you to it was pretty straightforward to follow, just click next a bunch. It won't try to install anything extra and it's pretty small. You do not have to use git or anything. But npm installing utif will use git to get to get the jpgJS package After installing it you will need to close the command prompt or terminal you are using and reopen it to have git show up in your path. Then this will work. |
@makr28 how do you feel about moving to jpeg-js instead? it's hosted on NPM and is a much smaller library. |
If it has the decoders needed, im game.
I can look into it.
…On Wed, Aug 15, 2018, 1:12 PM Andrew Lisowski ***@***.***> wrote:
@makr28 <https://github.com/makr28> how do you feel about moving to
jpeg-js instead? it's hosted on NPM and is a much smaller library.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKFc02BMP58PTk7g4RsYTEPRM9E1fks5uRFaTgaJpZM4Vu7R4>
.
|
Yeah jpeg-js actaully builds off of jpgjs. It even says so in the readme! I think it should have the necessary features. "Decoding |
Im game with that. Ill look into it unless @photopea wants too
…On Wed, Aug 15, 2018, 1:21 PM Andrew Lisowski ***@***.***> wrote:
Yeah jpeg-js actaully builds off of jpgjs. It even says so in the readme!
I think it should have the necessary features.
"Decoding
This library builds on the work of two other JPEG javascript libraries,
namely jpgjs for the decoding which is licensed under the Apache 2.0
License below:"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKMdvinCSfy3SwZ3cx1f1hvQfdWrjks5uRFiogaJpZM4Vu7R4>
.
|
Guys, I suggest to switch to the JPEG decoder from pdf.js : mozilla/pdf.js#9729 |
Thats good too
…On Wed, Aug 15, 2018, 3:45 PM Photopea ***@***.***> wrote:
Guys, I suggest to switch to the JPEG decoder from pdf.js :
mozilla/pdf.js#9729 <mozilla/pdf.js#9729>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKHgTOHhtjD8JjsALF0hLHIundK7Zks5uRHpegaJpZM4Vu7R4>
.
|
I'd say its not too good. That would increase your code by 200kb! Most being unused. https://bundlephobia.com/[email protected] What is the resistance to switching to jpeg-js?
cons:
If you guys choose to install pdfjs I'm gonna be forced to fork and publish UTIF so my bundle doesn't explode. current: 441.35kb (jpgjs 189.99kb + pako 213.83kb + utif 37.53kb) |
just utif alone adds 2-4 seconds to page load time on a GOOD connection |
From what i saw of his link, they seperated the decoders so i thought thats
all that would be pulled in.
…On Wed, Aug 15, 2018, 5:29 PM Andrew Lisowski ***@***.***> wrote:
I'd say its not too good. That would increase your code by 200kb! Most
being unused.
***@***.***
What is the resistance to switching to jpeg-js?
- same funcitonality
- 16.6kb vs a whopping 402.6kB
cons:
- ????
If you guys choose to install pdfjs I'm gonna be forced to fork and
publish UTIF so my bundle doesn't explode.
current: 441.35kb (jpgjs + pako + utif)
with pdfjs: ~600kb (pngjs + pako + utif)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKP0aS5uKunmCM4ZjDSVTPeQjSkSIks5uRJK3gaJpZM4Vu7R4>
.
|
did they separate them into a separate package? how would you go about only pulling the jpeg-decoder in? |
something like this might work
but it still doesn't address the fact that the dependency is still enormous I just tried installing the above in my testing project and it adds ~300kb to my project |
It also looks like jpgjs from pdf-dist uses streams so you might have trouble using it in browser |
That I dont know. @photopea?
…On Wed, Aug 15, 2018, 5:48 PM Andrew Lisowski ***@***.***> wrote:
something like this might work
const jpgjs = require('pdfjs-dist/lib/core/jpg')
but it still doesn't address the fact that the dependency is still enormous
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKJFLTH__p2V4-uEaAxmCfO8j0LJ2ks5uRJcigaJpZM4Vu7R4>
.
|
Guys, I never used NPM or Node.js , so I don't understand some fragments, that you are mentioning. I manually extracted JPEG decoder from PDF.js . It is "worth" attaching it for me in www.Photopea.com , as it is also used for opening JPG files. TIFFs with JPG compression are quite rare and I would recommend not to attach any JPEG decoder, unless you are sure your TIFFs will need it. But I don't know how to do it in NPM / Node.js terms. |
In npm there is no such thing as an optional peer dependancy. So you cannot optionally include specific dependancies based on what the user needs. This is a dead end/ I think you should keep the JPEG decoder in UTIF. Even though it may not be common, it exists and is handle in the current package, so it should be kept that way. Handling all the cases is better in my mind, and @photopea even mentioned it in another issue of mine. For UTIF to pull in just the jpgjs package from pngjs, they would of had to code it in a specific way that makes it possible to pull in just a part of the package. So this may be hard to do without submitting PRs to the pngjs repo. The best route that I see is going with jpeg-js. I have not heard from either of you why it wouldn't work or how jpgjs is better. I have listed reasons why jpeg-js is better above. Mainly it's feature parity and small size. Regardless of you npm experience you have to recognize that the browser downloading 16kb is better than the browser downloading 400kb. This effects page load time, something you probably care about for your web app @photopea do you have objections to switching to jpeg-js? What are your specific concerns? |
So you have to jpg decoders separate from PDF Js where for your website you
are just including the jpeg decoders not all of the other PDF stuff?
And the code is not included in the utif code, correct?
For me I need the decoders for Tiff documents because in the medical world
there's still a lot of them out there that use jpg.
If you have the decoders and a seperate git repo I can make it npm ready
and release it and add it to utif thru package.json for those of us using
nodejs.
…On Wed, Aug 15, 2018, 6:52 PM Photopea ***@***.***> wrote:
Guys, I never used NPM or Node.js , so I don't understand some fragments,
that you are mentioning.
I manually extracted JPEG decoder from PDF.js . It is "worth" attaching it
for me in www.Photopea.com , as it is also used for opening JPG files.
TIFFs with JPG compression are quite rare and I would recommend not to
attach any JPEG decoder, unless you are sure your TIFFs will need it. But I
don't know how to do it in NPM / Node.js terms.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKO92J1qu5Vw3hp2VALSrEF9OFHOUks5uRKYrgaJpZM4Vu7R4>
.
|
@revoyrm Can you try with jpeg-js first? I still see no reason to go with a package that is 12.5x bigger for no gain |
I mean it's photopea's project so they need to decide, I can look into both
ways though for node. @photopea just to make you feel better switching
jpgjs to jpegjs in package.json will not affect you or your website at all
since you don't use NodeJS.
I don't know when I'll get a chance to look at it, maybe not till Saturday.
If someone else wants to take a look, feel free.
…On Wed, Aug 15, 2018 at 7:43 PM, Andrew Lisowski ***@***.***> wrote:
1.
If he is doing that it is a highly inefficient way to do it. You are
potentially includeing the jpeg decoder twice. and since jpgjs is huge it's
probably adding .5mb to initial page load.
2.
Def not included in utif as you are currently maintaining a working
fork of jpgjs
@revoyrm <https://github.com/revoyrm> Can you try with jpeg-js first? I
still see no reason to go with a package that is 12.5x bigger for no gain
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKHySd2VS7lF-zQf1Icsk1_t9eQ-Tks5uRLIhgaJpZM4Vu7R4>
.
|
I can whip it together tonight. It's really more about if @photopea will merge it |
@syvaidya Hi, you are the one who understands JPEG, and who implemented the support of Type 6 and Type 7 compression for UTIF.js . Would it be possible to cut out the smallest sufficient part of a JPEG library and attach it directly into UTIF.js ? I guess such part will not require any changes in the future. How large that part would be? Could it fit into 10 - 15 kB? It wold be very nice to get rid of any dependencies in UTIF.js, as many people are complaining about them (see above). |
@photopea we have more users hitting this bug. It would be great if you could take a look at my PR |
@photopea this package is breaking when I try to upload my application to AWS, is possible replace this to jpeg-js? |
Hi Guys, I just inserted JpegDecoder into UTIF.js (about 11kB extra) , so the only dependency is pako.js now. @Scimonster could you please update the NPM configuration files and upload it to NPM? :) Thanks! |
Thank you and i can do it, you just delete the line
…On Fri, Aug 24, 2018, 5:21 AM Photopea ***@***.***> wrote:
Hi Guys, I just inserted JpegDecoder into UTIF.js (about 11kB extra) , so
the only dependency is pako.js now.
@Scimonster <https://github.com/Scimonster> could you please update the
NPM configuration files and upload it to NPM? :) Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKBP1fhRU-nkkERfxxNxm8bJ7QBaqks5uT8WJgaJpZM4Vu7R4>
.
|
@photopea during my initial testing of the current code, it is working with old style jpegs but not new style jpegs. I am going to look into it more before I open an issue. |
Please, just send me a TIFF file, which does not work. |
Ok Here is our test tiff for new jpeg decoding.
…On Fri, Aug 24, 2018, 11:07 AM Photopea ***@***.***> wrote:
Please, just send me a TIFF file, which does not work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKCnMHDwGSThzOVG9OSQAYSx6REmVks5uUBaxgaJpZM4Vu7R4>
.
|
Hi, I tried to open your TIFF file Type7-TTN2.tif in www.Photopea.com (which still uses an old UTIF.js), and it does not work either. So I think that your file is corrupted. I tested some other Type7 compressed TIFFs with the new version of UTIF.js, and they work well. |
Can you please give me a working test file?
…On Fri, Aug 24, 2018, 11:32 AM Photopea ***@***.***> wrote:
Hi, I tried to open your TIFF file Type7-TTN2.tif in www.Photopea.com
(which still uses an old UTIF.js), and it does not work either. So I think
that your file is corrupted. I tested some other Type7 compressed TIFFs
with the new version of Photopea, and they work well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKHitwWflgHb7rhIkr4XVreBCgeD2ks5uUBx1gaJpZM4Vu7R4>
.
|
It worked with the previous version of Utif using the decoders pulled in
thru jpgjs, we had though. So there is something wrong with the decoder.
…On Fri, Aug 24, 2018, 11:07 AM Photopea ***@***.***> wrote:
Please, just send me a TIFF file, which does not work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKCnMHDwGSThzOVG9OSQAYSx6REmVks5uUBaxgaJpZM4Vu7R4>
.
|
@revoyrm Could you please tell me, which "jpgjs" do you have in mind? |
Sorry i keep getting my git accounts messed up due to me getting these
notifications in both emails. I am the same person is makr28.
The old version of utif that used my Fork of jpg.Js, the file I sent you
worked/ does work. And it went through the new jpeg decoder method in utif.
In the current version of utif it does not work. I also emailed you two
other type 7 jpg compress tiffjs that do not work either.
…On Fri, Aug 24, 2018, 6:25 PM Photopea ***@***.***> wrote:
@revoyrm <https://github.com/revoyrm> Could you please tell me, which
"jpgjs" do you have in mind?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKNmwqSYjA1M6-YeVMh5NYky5Cn9Nks5uUH1hgaJpZM4Vu7R4>
.
|
I tried to use UTIF.js with this code: https://github.com/makr28/jpgjs/blob/master/jpg.js and I am getting absolutely the same error for your TIFF Type 7 files: JPEG error: SOI not found . So are you really sure it used to work with your files in the past? |
100% sure, my master branch still works. We are currently using fork of
utif from just before scimonster pulled my change (because we needed it
move and havent gotten around to switching it back.)
This would make me think a different change may have broken it except that
I'm getting the error in the Parse function
On Aug 24, 2018 6:34 PM, "Photopea" <[email protected]> wrote:
I tried to use UTIF.js with this code:
https://github.com/makr28/jpgjs/blob/master/jpg.js and I am getting
absolutely the same error for your TIFF Type 7 files: JPEG error: SOI not
found . So are you really sure it used to work with your files in the past?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKFUvIlhyyf6gHlrfqUpsJWgknpBGks5uUH-CgaJpZM4Vu7R4>
.
|
Could you send me the UTIF.js and JPG.js that you are using? You can copy-paste the JS code into www.pastebin.com . |
@photopea would you merge it if I wrote tests? Upgrades generally go easier when there are unit tests |
Im not at my work laptop right now but when i get home, ill upload something
…On Fri, Aug 24, 2018, 6:55 PM Photopea ***@***.***> wrote:
Could you send me the UTIF.js and JPG.js that you are using? You can
copy-paste the JS code into pastebin.com .
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKK93ykfIY7sTaymr8wKopqHZKHe9ks5uUIRngaJpZM4Vu7R4>
.
|
It was fixed and it should work well now. |
Thank you, ill try it
…On Sat, Aug 25, 2018, 4:38 AM Photopea ***@***.***> wrote:
It was fixed and it should work well now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3nKL1APlfPEoOzI0V_BL36uWgZXaZvks5uUQ0FgaJpZM4Vu7R4>
.
|
I get some error messages:
install log file:
2018-08-04T09_18_23_181Z-debug.log
The text was updated successfully, but these errors were encountered: