fix(rotate): should use transparency instead of white pixels while
rotating
This commit is contained in:
parent
0a9712fe4a
commit
232b1291fa
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user