Merge branch '17dec-unsharp'

This commit is contained in:
Alexander Vershilov 2023-01-05 15:54:35 +06:00
commit 32fdbf822a
2 changed files with 10 additions and 1 deletions

View File

@ -270,6 +270,10 @@ foreign import ccall "MagickShadowImage" magickShadowImage
foreign import ccall "MagickTrimImage" magickTrimImage foreign import ccall "MagickTrimImage" magickTrimImage
:: Ptr MagickWand -> CDouble -> IO MagickBooleanType :: Ptr MagickWand -> CDouble -> IO MagickBooleanType
-- | MagickUnsharpMaskImage() sharpens an image.
foreign import ccall "MagickUnsharpMaskImage" magickUnsharpMaskImage
:: Ptr MagickWand -> CDouble -> CDouble -> CDouble -> CDouble -> IO MagickBooleanType
-- | MagickSetImageOrientation() sets the image orientation. -- | MagickSetImageOrientation() sets the image orientation.
foreign import ccall "MagickSetImageOrientation" magickSetImageOrientation foreign import ccall "MagickSetImageOrientation" magickSetImageOrientation
:: Ptr MagickWand -> OrientationType -> IO MagickBooleanType :: Ptr MagickWand -> OrientationType -> IO MagickBooleanType

View File

@ -315,7 +315,7 @@ module Graphics.ImageMagick.MagickWand.WandImage
-- , transverseImage -- , transverseImage
-- , trimImage -- , trimImage
-- , uniqueImageColors -- , uniqueImageColors
-- , unsharpMaskImage , unsharpMaskImage
-- , vignetteImage -- , vignetteImage
-- , waveImage -- , waveImage
-- , whiteThresholdImage -- , whiteThresholdImage
@ -547,6 +547,11 @@ setVirtualPixelMethod = (liftIO .). F.magickSetVirtualPixelMethod
trimImage :: (MonadResource m) => PMagickWand -> Double -> m () trimImage :: (MonadResource m) => PMagickWand -> Double -> m ()
trimImage w fuzz = withException_ w $ F.magickTrimImage w (realToFrac fuzz) trimImage w fuzz = withException_ w $ F.magickTrimImage w (realToFrac fuzz)
-- | Sharpen the image with an unsharp mask operator.
unsharpMaskImage :: (MonadResource m) => PMagickWand -> Double -> Double -> Double -> Double -> m ()
unsharpMaskImage w rad sig gain thres = withException_ w $ F.magickUnsharpMaskImage w (realToFrac rad) (realToFrac sig)
(realToFrac gain) (realToFrac thres)
-- | sets the image orientation. -- | sets the image orientation.
setImageOrientation :: (MonadResource m) => PMagickWand -> OrientationType -> m () setImageOrientation :: (MonadResource m) => PMagickWand -> OrientationType -> m ()
setImageOrientation w o = withException_ w $! F.magickSetImageOrientation w o setImageOrientation w o = withException_ w $! F.magickSetImageOrientation w o