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

Throw when crop rectangle exceeds source bounds. #726

Merged
merged 2 commits into from Oct 6, 2018

Conversation

JimBobSquarePants
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

We should throw when a crop rectangle exceeds the image bounds. This helps prevent users misappropriating the method and expecting unintended results. Fixes #605

@codecov
Copy link

codecov bot commented Oct 6, 2018

Codecov Report

Merging #726 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #726      +/-   ##
==========================================
+ Coverage   88.71%   88.71%   +<.01%     
==========================================
  Files         892      892              
  Lines       39752    39756       +4     
  Branches     2741     2741              
==========================================
+ Hits        35267    35271       +4     
  Misses       3786     3786              
  Partials      699      699
Impacted Files Coverage Δ
...Tests/Processing/Processors/Transforms/CropTest.cs 100% <ø> (ø) ⬆️
.../Processing/Processors/Transforms/CropProcessor.cs 100% <100%> (ø) ⬆️
src/ImageSharp/Processing/CropExtensions.cs 100% <100%> (ø) ⬆️
...ImageSharp.Tests/Processing/Transforms/CropTest.cs 100% <100%> (ø) ⬆️
...ageSharp.Tests/BaseImageOperationsExtensionTest.cs 100% <100%> (ø) ⬆️
tests/ImageSharp.Tests/ImageOperationTests.cs 97.36% <100%> (-0.07%) ⬇️
...sing/Processors/Transforms/EntropyCropProcessor.cs 87.5% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff70890...298a2f0. Read the comment docs.

@JimBobSquarePants JimBobSquarePants merged commit 3ae862a into master Oct 6, 2018
@JimBobSquarePants JimBobSquarePants deleted the js/fix-605 branch February 23, 2019 10:22
antonfirsov pushed a commit to antonfirsov/ImageSharp that referenced this pull request Nov 11, 2019
Throw when crop rectangle exceeds source bounds.
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

1 participant