Skip to content
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

Add TrimBackground as an argument + go.mod + fix pointer bug [Proposal] #382

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

angelo-hub
Copy link

@angelo-hub angelo-hub commented Oct 18, 2021

  1. Use case: when using Vips_find_trim (for the Trim: true the 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 regular Background argument 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]

  2. adds unit testing for this new options

  3. adds a trim padding option to allow

  4. this also removes a unset pointer that was causing crashes when running trim operations at 30 RPS

  5. 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.

@@ -0,0 +1,3 @@
module github.com/goatapp/bimg
Copy link
Owner

@h2non h2non Oct 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update it to github.com/h2non/bimg?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I no longer work here but I can still update this if needed

@angelo-hub
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants