imagemagick-0.0.3.6: bindings to imagemagick library

Safe HaskellNone
LanguageHaskell98

Graphics.ImageMagick.MagickWand.MagickWand

Contents

Synopsis

Documentation

withMagickWandGenesis :: ResourceT IO c -> IO c

Create magic wand environment and closes it at the end of the work, should wrap all MagickWand functions withMagickWandGenesis :: IO a -> IO a withMagickWandGenesis :: (MonadCatchIO m, MonadBaseControl IO m, MonadCatchIO (ResourceT IO)) => (ResourceT m c) -> m c

localGenesis :: MonadBaseControl IO m => ResourceT m a -> m a

Open a nested block inside genesis (for tracking nested resources)

Creation

getSize :: MonadResource m => Ptr MagickWand -> m (Int, Int)

Returns the size associated with the magick wand.

setSize :: MonadResource m => Ptr MagickWand -> Int -> Int -> m ()

setImageArtifact :: MonadResource m => PMagickWand -> ByteString -> ByteString -> m ()

MagickSetImageArtifact() associates a artifact with an image. The format of the MagickSetImageArtifact method is:

deleteImageArtifact :: MonadResource m => PMagickWand -> ByteString -> m ()

MagickDeleteImageArtifact() deletes a wand artifact.

getIteratorIndex :: MonadResource m => Ptr MagickWand -> m Int

Returns the position of the iterator in the image list.

setIteratorIndex :: MonadResource m => Ptr MagickWand -> Int -> m ()

Sets the iterator to the given position in the image list specified with the index parameter. A zero index will set the first image as current, and so on. Negative indexes can be used to specify an image relative to the end of the images in the wand, with -1 being the last image in the wand.

deleteOption :: MonadResource m => Ptr MagickWand -> Text -> m ()

Associates one or options with the wand (e.g. setOption wand "jpeg:perserve" "yes").

setOption :: MonadResource m => Ptr MagickWand -> Text -> Text -> m ()

Associates one or options with the wand (e.g. setOption wand "jpeg:perserve" "yes").

deleteImageProperty :: MonadResource m => Ptr MagickWand -> Text -> m ()

Deletes a wand property

getImageProperty :: MonadResource m => Ptr MagickWand -> Text -> m Text

Returns a value associated with the specified property

setImageProperty :: MonadResource m => Ptr MagickWand -> Text -> Text -> m ()

Associates a property with an image.

getImageProperties :: MonadResource m => Ptr MagickWand -> Text -> m [Text]

Returns all the property names that match the specified pattern associated with a wand

getImageProfile :: MonadResource m => Ptr MagickWand -> Text -> m (Vector Word8)

Returns the named image profile.

removeImageProfile :: MonadResource m => Ptr MagickWand -> Text -> m (Vector Word8)

Removes the named image profile and returns it

setImageProfile :: MonadResource m => Ptr MagickWand -> Text -> Vector Word8 -> m ()

Adds a named profile to the magick wand. If a profile with the same name already exists, it is replaced. This method differs from the profileImage method in that it does not apply any CMS color profiles.

getImageProfiles :: MonadResource m => Ptr MagickWand -> Text -> m [Text]

Returns all the profile names that match the specified pattern associated with a wand.

getColorspace :: MonadResource m => PMagickWand -> m ColorspaceType

MagickGetColorspace() gets the wand colorspace type.

setColorspace :: MonadResource m => PMagickWand -> ColorspaceType -> m ()

MagickSetColorspace() sets the wand colorspace type.