Add TrimBackground as an argument + go.mod + fix pointer bug [Proposal]#382
Open
angelo-hub wants to merge 4 commits intoh2non:masterfrom
Open
Add TrimBackground as an argument + go.mod + fix pointer bug [Proposal]#382angelo-hub wants to merge 4 commits intoh2non:masterfrom
angelo-hub wants to merge 4 commits intoh2non:masterfrom
Conversation
h2non
reviewed
Oct 18, 2021
| @@ -0,0 +1,3 @@ | |||
| module github.com/goatapp/bimg | |||
Owner
There was a problem hiding this comment.
Can you please update it to github.com/h2non/bimg?
Author
There was a problem hiding this comment.
I did a master -> master PR so I can't change this, I will open a new PR later today using a branch and fix this!
Author
There was a problem hiding this comment.
I no longer work here but I can still update this if needed
Author
|
I know this is stale, we're working through some stuff internally with our version of imaginary, once we've wrapped up, can update this proposal/PR |
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.
Use case: when using Vips_find_trim (for the
Trim: truethe last argument is the "background" and any alpha channel is looked at as the background argument. In this case you may want to keep the alpha channel but pass it an argument that's a bright easily edge-able color (similar to a green screen). When using the regularBackgroundargument in this case it will flatten alpha channels to that background color when we want to keep alpha channel transparency. [Added in a way that maintains backwards compatibility with the existing API]adds unit testing for this new options
adds a trim padding option to allow
this also removes a unset pointer that was causing crashes when running trim operations at 30 RPS
add go.mod for modern module support
I can and would break these out into different branches and you guys can pick which features if any you want out of them but I'd highly recommend merging 1,2 and 4. 3 is more of a nice to have feature for our use case.