custom resize option in resize module - #1598
Draft
sharmamansi wants to merge 5 commits into
Draft
Conversation
Author
|
@publiclab/is-reviewers @keshav234156 please review this |
|
can you attach a working GIF. |
Author
Author
|
@ataata107 please review this |
ataata107
reviewed
Feb 10, 2020
| const checkbox = Number(options.checkbox); | ||
|
|
||
| if (resize_value == 100) return pixels; | ||
| if (resize_height == 100) return pixels; |
There was a problem hiding this comment.
This should be changed as we cant return the pixels if the new height is 100 because original image height may not be 100
ataata107
reviewed
Feb 10, 2020
| "type": "preserve aspect ratio", | ||
| "desc": "Percentage value of the resize", | ||
| "default": "125%" | ||
| "default": "0" |
There was a problem hiding this comment.
default should still be 125% for making the tests pass also make the default value of checkbox to be one
Author
There was a problem hiding this comment.
I guess you have seen my initial commit this was a mistake description should be the value of checkbox and I can't make it's default 125 as it can be 0 or 1 only.
ataata107
reviewed
Feb 10, 2020
| var new_width = Math.round(pixels.shape[0] * (resize_width / 100)), | ||
| new_height = Math.round(pixels.shape[1] * (resize_height / 100)); | ||
| } | ||
| var new_width = Math.round(pixels.shape[0] * (resize_height / 100)), |
harshkhandeparkar
marked this pull request as draft
July 27, 2021 21:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #1298
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
npm run test-all@publiclab/is-reviewersfor help, in a comment belowIf tests do fail, click on the red
Xto 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!