JuicyPixels-extra 0.2.1 → 0.2.2
raw patch · 4 files changed
+16/−6 lines, 4 filesdep ~criterionPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: criterion
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Codec/Picture/Extra.hs +1/−1
- JuicyPixels-extra.cabal +3/−3
- tests/Codec/Picture/ExtraSpec.hs +7/−2
CHANGELOG.md view
@@ -1,3 +1,8 @@+## Juicy Pixels Extra 0.2.2++* Fixed a bug in the `crop` function related to incorrect calculation of new+ height in some cases.+ ## Juicy Pixels Extra 0.2.1 * Documentation improvements.
Codec/Picture/Extra.hs view
@@ -97,7 +97,7 @@ x = min (imageWidth - 1) x' y = min (imageHeight - 1) y' w = min (imageWidth - x) w'- h = min (imageWidth - y) h'+ h = min (imageHeight - y) h' {-# INLINEABLE crop #-} -- | Flip an image horizontally.
JuicyPixels-extra.cabal view
@@ -1,6 +1,6 @@ name: JuicyPixels-extra-version: 0.2.1-cabal-version: >= 1.10+version: 0.2.2+cabal-version: >= 1.18 tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1 license: BSD3 license-file: LICENSE.md@@ -57,7 +57,7 @@ build-depends: base >= 4.7 && < 5.0 , JuicyPixels >= 3.2.6.4 && < 3.3 , JuicyPixels-extra- , criterion >= 0.6.2.1 && < 1.2+ , criterion >= 0.6.2.1 && < 1.3 if flag(dev) ghc-options: -O2 -Wall -Werror else
tests/Codec/Picture/ExtraSpec.hs view
@@ -43,12 +43,17 @@ "data-examples/lenna-scaled-up.png" cropSpec :: Spec-cropSpec =- context "when we pass arguments within image size" $+cropSpec = do+ context "when we pass arguments within image size (square)" $ it "produces correct image" $ checkWithFiles (crop 211 210 178 191) "data-examples/lenna.png" "data-examples/lenna-cropped.png"+ context "when we pass arguments within image size (vertical)" $+ it "produces correct image" $+ checkWithFiles (crop 0 512 512 512)+ "data-examples/lenna-below.png"+ "data-examples/lenna.png" flipHorizontallySpec :: Spec flipHorizontallySpec =