packages feed

JuicyPixels-extra 0.2.0 → 0.2.1

raw patch · 6 files changed

+19/−117 lines, 6 filesdep ~criterionPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: criterion

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## Juicy Pixels Extra 0.2.1++* Documentation improvements.+ ## Juicy Pixels Extra 0.2.0  * Added `rotate180`, `beside`, and `below`.
Codec/Picture/Extra.hs view
@@ -3,7 +3,7 @@ -- Copyright   :  © 2016–2017 Mark Karpov -- License     :  BSD 3 clause ----- Maintainer  :  Mark Karpov <markkarpov@openmailbox.org>+-- Maintainer  :  Mark Karpov <markkarpov92@gmail.com> -- Stability   :  experimental -- Portability :  portable --@@ -22,6 +22,7 @@   , rotateLeft90   , rotateRight90   , rotate180+    -- * Other   , beside   , below ) where@@ -31,7 +32,7 @@ import qualified Codec.Picture.Types as M import Data.List (foldl1') --- | Scale image using bi-linear interpolation. This is specialized to+-- | Scale an image using bi-linear interpolation. This is specialized to -- 'PixelRGB8' only for speed (polymorphic version is easily written, but -- it's more than twice as slow). @@ -79,7 +80,7 @@       (0xff :: Pixel8) `min` (fromIntegral x + fromIntegral y) {-# INLINE addp #-} --- | Crop given image. If supplied coordinates are greater than size of+-- | Crop a given image. If supplied coordinates are greater than size of -- original image, image boundaries are used instead.  crop :: Pixel a@@ -99,7 +100,7 @@     h = min (imageWidth  - y) h' {-# INLINEABLE crop #-} --- | Flip image horizontally.+-- | Flip an image horizontally.  flipHorizontally :: Pixel a => Image a -> Image a flipHorizontally img@Image {..} =@@ -108,7 +109,7 @@     gen x = pixelAt img (imageWidth - 1 - x) {-# INLINEABLE flipHorizontally #-} --- | Flip image vertically.+-- | Flip an image vertically.  flipVertically :: Pixel a => Image a -> Image a flipVertically img@Image {..} =@@ -117,7 +118,7 @@     gen x y = pixelAt img x (imageHeight - 1 - y) {-# INLINEABLE flipVertically #-} --- | Rotate image to the left by 90°.+-- | Rotate an image to the left by 90°.  rotateLeft90 :: Pixel a => Image a -> Image a rotateLeft90 img@Image {..} =@@ -126,7 +127,7 @@     gen x y = pixelAt img y x {-# INLINEABLE rotateLeft90 #-} --- | Rotate image to the right by 90°.+-- | Rotate an image to the right by 90°.  rotateRight90 :: Pixel a => Image a -> Image a rotateRight90 img@Image {..} =@@ -135,7 +136,7 @@     gen x y = pixelAt img y (imageHeight - 1 - x) {-# INLINEABLE rotateRight90 #-} --- | Rotate image by 180°, i.e flip both vertically and horizontally.+-- | Rotate an image by 180°, i.e flip both vertically and horizontally. -- -- @since 0.2.0 
JuicyPixels-extra.cabal view
@@ -1,43 +1,11 @@------ Cabal configuration for ‘JuicyPixels-extra’ package.------ Copyright © 2016–2017 Mark Karpov <markkarpov@openmailbox.org>------ Redistribution and use in source and binary forms, with or without--- modification, are permitted provided that the following conditions are--- met:------ * Redistributions of source code must retain the above copyright notice,---   this list of conditions and the following disclaimer.------ * Redistributions in binary form must reproduce the above copyright---   notice, this list of conditions and the following disclaimer in the---   documentation and/or other materials provided with the distribution.------ * Neither the name Mark Karpov nor the names of contributors may be used---   to endorse or promote products derived from this software without---   specific prior written permission.------ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY--- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED--- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE--- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY--- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL--- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS--- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)--- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,--- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN--- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE--- POSSIBILITY OF SUCH DAMAGE.- name:                 JuicyPixels-extra-version:              0.2.0+version:              0.2.1 cabal-version:        >= 1.10-tested-with:          GHC==7.8.4, GHC==7.10.3, GHC==8.0.2+tested-with:          GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1 license:              BSD3 license-file:         LICENSE.md-author:               Mark Karpov <markkarpov@openmailbox.org>-maintainer:           Mark Karpov <markkarpov@openmailbox.org>+author:               Mark Karpov <markkarpov92@gmail.com>+maintainer:           Mark Karpov <markkarpov92@gmail.com> homepage:             https://github.com/mrkkrp/JuicyPixels-extra bug-reports:          https://github.com/mrkkrp/JuicyPixels-extra/issues category:             Graphics, Image
README.md view
@@ -7,15 +7,8 @@ [![Build Status](https://travis-ci.org/mrkkrp/JuicyPixels-extra.svg?branch=master)](https://travis-ci.org/mrkkrp/JuicyPixels-extra) [![Coverage Status](https://coveralls.io/repos/mrkkrp/JuicyPixels-extra/badge.svg?branch=master&service=github)](https://coveralls.io/github/mrkkrp/JuicyPixels-extra?branch=master) -Missing primitive stuff you shouldn't need to re-implement yourself. I think-haddocks are pretty self-explanatory. Currently the package includes the-following functionality:--* scaling (bi-linear interpolation);-* cropping;-* flipping horizontally and vertically;-* 90° and 180° rotation (left and right);-* aligning several images side by side or one on top of the other.+Missing primitives you shouldn't need to re-implement yourself. I think the+Haddocks are pretty self-explanatory, so head straight to them.  ## License 
bench/Main.hs view
@@ -1,35 +1,3 @@------ Benchmarks for the ‘JuicyPixels-extra’ package.------ Copyright © 2016–2017 Mark Karpov <markkarpov@openmailbox.org>------ Redistribution and use in source and binary forms, with or without--- modification, are permitted provided that the following conditions are--- met:------ * Redistributions of source code must retain the above copyright notice,---   this list of conditions and the following disclaimer.------ * Redistributions in binary form must reproduce the above copyright---   notice, this list of conditions and the following disclaimer in the---   documentation and/or other materials provided with the distribution.------ * Neither the name Mark Karpov nor the names of contributors may be used---   to endorse or promote products derived from this software without---   specific prior written permission.------ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY--- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED--- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE--- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY--- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL--- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS--- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)--- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,--- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN--- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE--- POSSIBILITY OF SUCH DAMAGE.- module Main (main) where  import Codec.Picture
tests/Codec/Picture/ExtraSpec.hs view
@@ -1,35 +1,3 @@------ Tests for the ‘JuicyPixels-extra’ package.------ Copyright © 2016–2017 Mark Karpov <markkarpov@openmailbox.org>------ Redistribution and use in source and binary forms, with or without--- modification, are permitted provided that the following conditions are--- met:------ * Redistributions of source code must retain the above copyright notice,---   this list of conditions and the following disclaimer.------ * Redistributions in binary form must reproduce the above copyright---   notice, this list of conditions and the following disclaimer in the---   documentation and/or other materials provided with the distribution.------ * Neither the name Mark Karpov nor the names of contributors may be used---   to endorse or promote products derived from this software without---   specific prior written permission.------ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY--- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED--- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE--- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY--- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL--- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS--- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)--- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,--- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN--- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE--- POSSIBILITY OF SUCH DAMAGE.- module Codec.Picture.ExtraSpec   ( main   , spec )