gi-vips-8.0.4: libvips GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Vips.Objects.Foreign

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Foreign Source #

Memory-managed wrapper type.

Constructors

Foreign (ManagedPtr Foreign) 

Instances

Instances details
Eq Foreign Source # 
Instance details

Defined in GI.Vips.Objects.Foreign

Methods

(==) :: Foreign -> Foreign -> Bool #

(/=) :: Foreign -> Foreign -> Bool #

GObject Foreign Source # 
Instance details

Defined in GI.Vips.Objects.Foreign

ManagedPtrNewtype Foreign Source # 
Instance details

Defined in GI.Vips.Objects.Foreign

Methods

toManagedPtr :: Foreign -> ManagedPtr Foreign

TypedObject Foreign Source # 
Instance details

Defined in GI.Vips.Objects.Foreign

Methods

glibType :: IO GType

HasParentTypes Foreign Source # 
Instance details

Defined in GI.Vips.Objects.Foreign

IsGValue (Maybe Foreign) Source #

Convert Foreign to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Vips.Objects.Foreign

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Foreign -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Foreign)

type ParentTypes Foreign Source # 
Instance details

Defined in GI.Vips.Objects.Foreign

type ParentTypes Foreign = '[Operation, Object, Object]

class (GObject o, IsDescendantOf Foreign o) => IsForeign o Source #

Type class for types which can be safely cast to Foreign, for instance with toForeign.

Instances

Instances details
(GObject o, IsDescendantOf Foreign o) => IsForeign o Source # 
Instance details

Defined in GI.Vips.Objects.Foreign

toForeign :: (MonadIO m, IsForeign o) => o -> m Foreign Source #

Cast to Foreign, for types for which this is known to be safe. For general casts, use castTo.

Methods

findLoad

foreignFindLoad Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

filename: file to find a loader for

-> m Text

Returns: the name of an operation on success, Nothing on error

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

data: start of memory buffer

-> m Text

Returns: the name of an operation on success, Nothing on error.

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().

findLoadSource

foreignFindLoadSource Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Source

source: source to load from

-> m Text

Returns: the name of an operation on success, Nothing on error.

Searches for an operation you could use to load a source. To see the range of source loaders supported by your vips, try something like:

vips -l | grep load_source

See also: vips_image_new_from_source().

findSave

foreignFindSave Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

filename: name to find a saver for

-> m (Maybe Text)

Returns: the name of an operation on success, Nothing on error

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

suffix: name to find a saver for

-> m (Maybe Text)

Returns: the name of an operation on success, Nothing on error

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

suffix: format to find a saver for

-> m (Maybe Text)

Returns: the name of an operation on success, Nothing on error

Searches for an operation you could use to write to a target in suffix format.

See also: vips_image_write_to_buffer().

isA

foreignIsA Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

loader: name of loader to use for test

-> Text

filename: file to test

-> m Bool

Returns: True if filename can be loaded by loader.

Return True if filename can be loaded by loader. loader is something like "tiffload" or "VipsForeignLoadTiff".

isABuffer

foreignIsABuffer Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

loader: name of loader to use for test

-> ByteString

data: pointer to the buffer to test

-> m Bool

Returns: True if data can be loaded by loader.

Return True if data can be loaded by loader. loader is something like "tiffload_buffer" or "VipsForeignLoadTiffBuffer".

isASource

foreignIsASource Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

loader: name of loader to use for test

-> Source

source: source to test

-> m Bool

Returns: True if data can be loaded by source.

Return True if source can be loaded by loader. loader is something like "tiffload_source" or "VipsForeignLoadTiffSource".

map

foreignMap Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

base: base class to search below (eg. "VipsForeignLoad")

-> SListMap2Fn

fn: function to apply to each ForeignClass

-> Ptr ()

a: user data

-> Ptr ()

b: user data

-> 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().