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

solve issue 81 #99

Closed
wants to merge 2 commits into from
Closed

solve issue 81 #99

wants to merge 2 commits into from

Conversation

clover2024
Copy link

test cases written in BackgroundTest.java

test cases written in BackgroundTest.java
Copy link
Owner

@kennycason kennycason left a comment

Choose a reason for hiding this comment

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

@apostlewang I like the direction but have a couple questions/suggestions.

If you can get those resolved I can merge in. If not, I don't mind making the changes and merging in.

Thanks for contribution and apologies for the huge delay!

* @param alpha The transparent index, should range from 0 to 10
* @throws IOException when fails to open file stream
*/
public PixelBoundaryBackground(final InputStream imageInputStream, int alpha) throws Exception {
Copy link
Owner

Choose a reason for hiding this comment

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

I think alpha should just be a 0-255 value instead of clamping it between [0,10].

int imgHeight = srcImage.getHeight();
int imgWidth = srcImage.getWidth();
//get the pixel of left upper corner
int c = srcImage.getRGB(3, 3);
Copy link
Owner

Choose a reason for hiding this comment

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

I think we should probably pass in an int backgroundColor to the function instead of relying on pixel 3x3 which could be anything.

@clover2024
Copy link
Author

@apostlewang I like the direction but have a couple questions/suggestions.

If you can get those resolved I can merge in. If not, I don't mind making the changes and merging in.

Thanks for contribution and apologies for the huge delay!

Sorry for too busy recently, much thanks if you can make the changes and merge them in~

@clover2024 clover2024 closed this by deleting the head repository Jun 21, 2023
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.

2 participants