Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype Foreign = Foreign (ManagedPtr Foreign)
- class (GObject o, IsDescendantOf Foreign o) => IsForeign o
- toForeign :: (MonadIO m, IsForeign o) => o -> m Foreign
- foreignFindLoad :: (HasCallStack, MonadIO m) => Text -> m Text
- foreignFindLoadBuffer :: (HasCallStack, MonadIO m) => ByteString -> m Text
- foreignFindSave :: (HasCallStack, MonadIO m) => Text -> m Text
- foreignFindSaveBuffer :: (HasCallStack, MonadIO m) => Text -> m Text
- foreignFindSaveTarget :: (HasCallStack, MonadIO m) => Text -> m Text
- foreignGetSuffixes :: (HasCallStack, MonadIO m) => m [Text]
- foreignIsA :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool
- foreignIsABuffer :: (HasCallStack, MonadIO m) => Text -> ByteString -> m Bool
- foreignMap :: (HasCallStack, MonadIO m) => Text -> SListMap2Fn -> Ptr () -> Ptr () -> m (Ptr ())
Exported types
Memory-managed wrapper type.
Instances
Eq Foreign Source # | |
GObject Foreign Source # | |
Defined in GI.Vips.Objects.Foreign | |
ManagedPtrNewtype Foreign Source # | |
Defined in GI.Vips.Objects.Foreign toManagedPtr :: Foreign -> ManagedPtr Foreign # | |
TypedObject Foreign Source # | |
Defined in GI.Vips.Objects.Foreign | |
HasParentTypes Foreign Source # | |
Defined in GI.Vips.Objects.Foreign | |
IsGValue (Maybe Foreign) Source # | Convert |
Defined in GI.Vips.Objects.Foreign | |
type ParentTypes Foreign Source # | |
Defined in GI.Vips.Objects.Foreign |
class (GObject o, IsDescendantOf Foreign o) => IsForeign o Source #
Instances
(GObject o, IsDescendantOf Foreign o) => IsForeign o Source # | |
Defined in GI.Vips.Objects.Foreign |
Methods
Click to display all available methods, including inherited ones
Methods
argumentIsset, argumentNeedsstring, bindProperty, bindPropertyFull, build, forceFloating, freezeNotify, getv, invalidate, isFloating, localCb, notify, notifyByPspec, preclose, printDump, printName, printSummary, ref, refSink, rewind, runDispose, sanity, stealData, stealQdata, thawNotify, unref, unrefOutputs, watchClosure.
Getters
getArgumentFlags, getArgumentPriority, getArgumentToString, getData, getDescription, getFlags, getQdata.
Setters
setArgumentFromString, setData, setDataFull, setFromString, setRequired, setStatic.
findLoad
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Text | Returns: the name of an operation on success, |
Searches for an operation you could use to load filename
. Any trailing
options on filename
are stripped and ignored.
See also: foreignFindLoadBuffer
, vips_image_new_from_file()
.
findLoadBuffer
foreignFindLoadBuffer Source #
:: (HasCallStack, MonadIO m) | |
=> ByteString |
|
-> m Text | Returns: the name of an operation on success, |
Searches for an operation you could use to load a memory buffer. To see the range of buffer loaders supported by your vips, try something like:
vips -l | grep load_buffer
See also: vips_image_new_from_buffer()
.
findSave
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Text | Returns: the name of an operation on success, |
Searches for an operation you could use to write to filename
.
Any trailing options on filename
are stripped and ignored.
See also: foreignFindSaveBuffer
, vips_image_write_to_file()
.
findSaveBuffer
foreignFindSaveBuffer Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Text | Returns: the name of an operation on success, |
Searches for an operation you could use to write to a buffer in suffix
format.
See also: vips_image_write_to_buffer()
.
findSaveTarget
foreignFindSaveTarget Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Text | Returns: the name of an operation on success, |
Searches for an operation you could use to write to a target in suffix
format.
See also: vips_image_write_to_buffer()
.
getSuffixes
:: (HasCallStack, MonadIO m) | |
=> m [Text] | Returns: all supported file extensions, as a
|
Get a Nothing
-terminated array listing all the supported suffixes.
This is not the same as all the supported file types, since libvips detects image format for load by testing the first few bytes.
Use foreignFindLoad
to detect type for a specific file.
Free the return result with strfreev
.
isA
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m Bool | Returns: |
Return True
if filename
can be loaded by loader
. loader
is something
like "tiffload" or "VipsForeignLoadTiff".
isABuffer
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> ByteString |
|
-> m Bool | Returns: |
Return True
if data
can be loaded by loader
. loader
is something
like "tiffload_buffer" or "VipsForeignLoadTiffBuffer".
map
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> SListMap2Fn |
|
-> Ptr () |
|
-> Ptr () |
|
-> m (Ptr ()) | Returns: the result of iteration |
Apply a function to every ForeignClass
that VIPS knows about. Foreigns
are presented to the function in priority order.
Like all VIPS map functions, if fn
returns Nothing
, iteration continues. If
it returns non-Nothing
, iteration terminates and that value is returned. The
map function returns Nothing
if all calls return Nothing
.
See also: vips_slist_map()
.