fix(rotate): should use transparency instead of white pixels while

rotating
This commit is contained in:
Mahdi Dibaiee 2017-02-04 12:16:48 +03:30
parent 0a9712fe4a
commit 232b1291fa
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
name: picedit
version: 0.2.1.0
version: 0.2.2.0
synopsis: simple image manipulation functions
description: Simple set of functions for image manipulation: contrast, brightnesss, rotation, etc.
homepage: https://github.com/mdibaiee/picedit#readme

View File

@ -139,7 +139,7 @@ module Data.Picture ( Picture
-- move them back to the origin
movedIndices = map (\[x, y] -> [x + originX, y + originY]) rotatedIndices
f m = reshape (cols m) $ fromList $ map (\[x, y] -> if y < 0 || y >= rows r || x < 0 || x >= cols r then 255 else m `atIndex` (y, x)) movedIndices
f m = reshape (cols m) $ fromList $ map (\[x, y] -> if y < 0 || y >= rows r || x < 0 || x >= cols r then 0 else m `atIndex` (y, x)) movedIndices
-- | Compress the image using SVD
-- note: this is not size compression, it's just a k-rank approximation of the image