image-sequencer icon indicating copy to clipboard operation
image-sequencer copied to clipboard

Lossless compression module

Open daemon1024 opened this issue 5 years ago • 8 comments

Fixes #1505

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • [ ] tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm run test-all
  • [x] code is in uniquely-named feature branch and has no merge conflicts
  • [ ] PR is descriptively titled
  • [x] ask @publiclab/is-reviewers for help, in a comment below
  • [ ] Insert-step functionality is working correct as expected.

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part Thanks!

daemon1024 avatar Jan 31 '20 19:01 daemon1024

Thanks for opening this pull request! There may be some errors, but don't worry! We're here to help! 👍🎉😄

welcome[bot] avatar Jan 31 '20 19:01 welcome[bot]

I can't seem to understand how do I pass the input to the compress_images function. I think it needs a path to the image but i am getting input as an argument from the draw function so i don't get how to pass and process it.

@publiclab/is-reviewers

daemon1024 avatar Feb 01 '20 19:02 daemon1024

@blurry-x-face @jywarren @HarshKhandeparkar @publiclab/is-reviewers please help @daemon1024 . I have quizes going on.

niravasher avatar Feb 06 '20 18:02 niravasher

@niravasher Thanks a lot for taking your time out from your quizzes and helping me out.

I have asked for help in gitter channel too. Hopefully someone else can help me out too :)

daemon1024 avatar Feb 06 '20 19:02 daemon1024

Thanks a lot for taking your time out from your quizzes and helping me out.

No problem bro. Always love to help (although I am not an expert here :smile: ) The minifyImage module is also an npm module https://www.npmjs.com/package/imagemin . Compare this module with the one you are using. See how the images are used as input files. Then see in compress-image module how files are used as an input like in the lines 64 to 81 and try to do the same thing. @daemon1024

niravasher avatar Feb 06 '20 19:02 niravasher

gitpod-io[bot] avatar Jul 07 '20 16:07 gitpod-io[bot]

Codecov Report

Merging #1603 into main will increase coverage by 9.96%. The diff coverage is 62.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1603      +/-   ##
==========================================
+ Coverage   55.11%   65.08%   +9.96%     
==========================================
  Files         117      134      +17     
  Lines        2344     2761     +417     
  Branches      360      440      +80     
==========================================
+ Hits         1292     1797     +505     
+ Misses       1052      964      -88     
Impacted Files Coverage Δ
examples/lib/scopeQuery.js 18.51% <ø> (ø)
src/Modules.js 100.00% <ø> (ø)
src/modules/WebglDistort/Module.js 2.29% <0.00%> (ø)
src/ui/SetInputStep.js 12.90% <0.00%> (-1.39%) :arrow_down:
src/modules/ColorHalftone/Module.js 3.63% <3.63%> (ø)
examples/lib/defaultHtmlStepUi.js 11.35% <4.08%> (-0.85%) :arrow_down:
examples/lib/intermediateHtmlStepUi.js 11.11% <5.55%> (+0.94%) :arrow_up:
src/modules/LosslessCompression/Module.js 15.78% <15.78%> (ø)
examples/lib/insertPreview.js 13.15% <20.00%> (-0.36%) :arrow_down:
src/util/getImageDimensions.js 20.00% <20.00%> (ø)
... and 104 more

codecov[bot] avatar Jul 07 '20 17:07 codecov[bot]

@daemon1024 Converting this to a draft for now. Please feel free to make it to a normal PR if you get time to push the requested changes :)

harshkhandeparkar avatar Oct 17 '20 16:10 harshkhandeparkar