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 |
- Methods
- addOptionEntries
- blockUntrustedSet
- cacheDropAll
- cacheGetMax
- cacheGetMaxFiles
- cacheGetMaxMem
- cacheGetSize
- cacheOperationAdd
- cacheOperationBuild
- cacheOperationLookup
- cachePrint
- cacheSetDump
- cacheSetMax
- cacheSetMaxFiles
- cacheSetMaxMem
- cacheSetTrace
- callArgv
- callOptions
- check8or16
- checkBandno
- checkBands
- checkBands1or3
- checkBands1orn
- checkBands1ornUnary
- checkBandsAtleast
- checkBandsSame
- checkCoding
- checkCodingKnown
- checkCodingNoneorlabq
- checkCodingSame
- checkComplex
- checkFormat
- checkFormatSame
- checkHist
- checkInt
- checkMatrix
- checkMono
- checkNoncomplex
- checkOddsquare
- checkPrecisionIntfloat
- checkSeparable
- checkSizeSame
- checkTwocomponents
- checkU8or16
- checkU8or16orf
- checkUint
- checkUintorf
- checkUncoded
- checkVector
- checkVectorLength
- classFind
- colAb2Ch
- colAb2h
- colC2Ccmc
- colCcmc2C
- colCh2ab
- colCh2hcmc
- colChcmc2h
- colDE00
- colL2Lcmc
- colLab2XYZ
- colLcmc2L
- colMakeTablesCMC
- colSRGB2scRGB16
- colSRGB2scRGB8
- colScRGB2BW16
- colScRGB2BW8
- colScRGB2XYZ
- colScRGB2sRGB16
- colScRGB2sRGB8
- colXYZ2Lab
- colXYZ2scRGB
- concurrencyGet
- concurrencySet
- errorBuffer
- errorBufferCopy
- errorClear
- errorFreeze
- errorG
- errorThaw
- filenameGetFilename
- filenameGetOptions
- foreignFlags
- formatSizeof
- gError
- getArgv0
- getDiscThreshold
- getPrgname
- guessLibdir
- guessPrefix
- iccIsCompatibleProfile
- iccPresent
- init
- leakSet
- malloc
- nicknameFind
- objectSetMember_
- pathFilename7
- pathMode7
- pythagoras
- shutdown
- strdup
- threadShutdown
- trackedClose
- trackedFree
- trackedGetAllocs
- trackedGetFiles
- trackedGetMem
- trackedGetMemHighwater
- trackedMalloc
- trackedOpen
- typeDepth
- typeFind
- valueGetArea
- valueGetArray
- valueGetArrayDouble
- valueGetArrayImage
- valueGetArrayInt
- valueGetBlob
- valueGetRefString
- valueGetSaveString
- valueIsNull
- valueSetArea
- valueSetArray
- valueSetArrayDouble
- valueSetArrayImage
- valueSetArrayInt
- valueSetArrayObject
- valueSetBlob
- valueSetBlobFree
- valueSetRefString
- valueSetSaveString
- version
- versionString
Synopsis
- addOptionEntries :: (HasCallStack, MonadIO m) => OptionGroup -> m ()
- blockUntrustedSet :: (HasCallStack, MonadIO m) => Bool -> m ()
- cacheDropAll :: (HasCallStack, MonadIO m) => m ()
- cacheGetMax :: (HasCallStack, MonadIO m) => m Int32
- cacheGetMaxFiles :: (HasCallStack, MonadIO m) => m Int32
- cacheGetMaxMem :: (HasCallStack, MonadIO m) => m Word64
- cacheGetSize :: (HasCallStack, MonadIO m) => m Int32
- cacheOperationAdd :: (HasCallStack, MonadIO m, IsOperation a) => a -> m ()
- cacheOperationBuild :: (HasCallStack, MonadIO m, IsOperation a) => a -> m Operation
- cacheOperationLookup :: (HasCallStack, MonadIO m, IsOperation a) => a -> m Operation
- cachePrint :: (HasCallStack, MonadIO m) => m ()
- cacheSetDump :: (HasCallStack, MonadIO m) => Bool -> m ()
- cacheSetMax :: (HasCallStack, MonadIO m) => Int32 -> m ()
- cacheSetMaxFiles :: (HasCallStack, MonadIO m) => Int32 -> m ()
- cacheSetMaxMem :: (HasCallStack, MonadIO m) => Word64 -> m ()
- cacheSetTrace :: (HasCallStack, MonadIO m) => Bool -> m ()
- callArgv :: (HasCallStack, MonadIO m, IsOperation a) => a -> Int32 -> Text -> m Int32
- callOptions :: (HasCallStack, MonadIO m, IsOperation a) => OptionGroup -> a -> m ()
- check8or16 :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkBandno :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> Int32 -> m Int32
- checkBands :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> Int32 -> m Int32
- checkBands1or3 :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkBands1orn :: (HasCallStack, MonadIO m, IsImage a, IsImage b) => Text -> a -> b -> m Int32
- checkBands1ornUnary :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> Int32 -> m Int32
- checkBandsAtleast :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> Int32 -> m Int32
- checkBandsSame :: (HasCallStack, MonadIO m, IsImage a, IsImage b) => Text -> a -> b -> m Int32
- checkCoding :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> Coding -> m Int32
- checkCodingKnown :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkCodingNoneorlabq :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkCodingSame :: (HasCallStack, MonadIO m, IsImage a, IsImage b) => Text -> a -> b -> m Int32
- checkComplex :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkFormat :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> BandFormat -> m Int32
- checkFormatSame :: (HasCallStack, MonadIO m, IsImage a, IsImage b) => Text -> a -> b -> m Int32
- checkHist :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkInt :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkMatrix :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m (Int32, Image)
- checkMono :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkNoncomplex :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkOddsquare :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkPrecisionIntfloat :: (HasCallStack, MonadIO m) => Text -> Precision -> m Int32
- checkSeparable :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkSizeSame :: (HasCallStack, MonadIO m, IsImage a, IsImage b) => Text -> a -> b -> m Int32
- checkTwocomponents :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkU8or16 :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkU8or16orf :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkUint :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkUintorf :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkUncoded :: (HasCallStack, MonadIO m, IsImage a) => Text -> a -> m Int32
- checkVector :: (HasCallStack, MonadIO m, IsImage a) => Text -> Int32 -> a -> m Int32
- checkVectorLength :: (HasCallStack, MonadIO m) => Text -> Int32 -> Int32 -> m Int32
- classFind :: (HasCallStack, MonadIO m) => Text -> Text -> m ObjectClass
- colAb2Ch :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> m ()
- colAb2h :: (HasCallStack, MonadIO m) => Double -> Double -> m Double
- colC2Ccmc :: (HasCallStack, MonadIO m) => Float -> m Float
- colCcmc2C :: (HasCallStack, MonadIO m) => Float -> m Float
- colCh2ab :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> m ()
- colCh2hcmc :: (HasCallStack, MonadIO m) => Float -> Float -> m Float
- colChcmc2h :: (HasCallStack, MonadIO m) => Float -> Float -> m Float
- colDE00 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> Float -> Float -> m Float
- colL2Lcmc :: (HasCallStack, MonadIO m) => Float -> m Float
- colLab2XYZ :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> m (Float, Float, Float)
- colLcmc2L :: (HasCallStack, MonadIO m) => Float -> m Float
- colMakeTablesCMC :: (HasCallStack, MonadIO m) => m ()
- colSRGB2scRGB16 :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Float -> Float -> Float -> m Int32
- colSRGB2scRGB8 :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Float -> Float -> Float -> m Int32
- colScRGB2BW16 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> m Int32
- colScRGB2BW8 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> m Int32
- colScRGB2XYZ :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> m (Int32, Float, Float, Float)
- colScRGB2sRGB16 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> Int32 -> Int32 -> m Int32
- colScRGB2sRGB8 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> Int32 -> Int32 -> m Int32
- colXYZ2Lab :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> m (Float, Float, Float)
- colXYZ2scRGB :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> m (Int32, Float, Float, Float)
- concurrencyGet :: (HasCallStack, MonadIO m) => m Int32
- concurrencySet :: (HasCallStack, MonadIO m) => Int32 -> m ()
- errorBuffer :: (HasCallStack, MonadIO m) => m Text
- errorBufferCopy :: (HasCallStack, MonadIO m) => m Text
- errorClear :: (HasCallStack, MonadIO m) => m ()
- errorFreeze :: (HasCallStack, MonadIO m) => m ()
- errorG :: (HasCallStack, MonadIO m) => m ()
- errorThaw :: (HasCallStack, MonadIO m) => m ()
- filenameGetFilename :: (HasCallStack, MonadIO m) => Text -> m Text
- filenameGetOptions :: (HasCallStack, MonadIO m) => Text -> m Text
- foreignFlags :: (HasCallStack, MonadIO m) => Text -> Text -> m [ForeignFlags]
- formatSizeof :: (HasCallStack, MonadIO m) => BandFormat -> m Word64
- gError :: (HasCallStack, MonadIO m) => m ()
- getArgv0 :: (HasCallStack, MonadIO m) => m Text
- getDiscThreshold :: (HasCallStack, MonadIO m) => m Word64
- getPrgname :: (HasCallStack, MonadIO m) => m Text
- guessLibdir :: (HasCallStack, MonadIO m) => Text -> Text -> m Text
- guessPrefix :: (HasCallStack, MonadIO m) => Text -> Text -> m Text
- iccIsCompatibleProfile :: (HasCallStack, MonadIO m, IsImage a) => a -> Ptr () -> Word64 -> m Bool
- iccPresent :: (HasCallStack, MonadIO m) => m Int32
- init :: (HasCallStack, MonadIO m) => Text -> m Int32
- leakSet :: (HasCallStack, MonadIO m) => Bool -> m ()
- malloc :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Word64 -> m (Ptr ())
- nicknameFind :: (HasCallStack, MonadIO m) => GType -> m Text
- objectSetMember_ :: (HasCallStack, MonadIO m, IsObject a, IsObject b, IsObject c) => a -> GParamSpec -> b -> c -> m ()
- pathFilename7 :: (HasCallStack, MonadIO m) => Text -> m Text
- pathMode7 :: (HasCallStack, MonadIO m) => Text -> m Text
- pythagoras :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> Float -> Float -> m Float
- shutdown :: (HasCallStack, MonadIO m) => m ()
- strdup :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Text -> m Text
- threadShutdown :: (HasCallStack, MonadIO m) => m ()
- trackedClose :: (HasCallStack, MonadIO m) => Int32 -> m Int32
- trackedFree :: (HasCallStack, MonadIO m) => Ptr () -> m ()
- trackedGetAllocs :: (HasCallStack, MonadIO m) => m Int32
- trackedGetFiles :: (HasCallStack, MonadIO m) => m Int32
- trackedGetMem :: (HasCallStack, MonadIO m) => m Word64
- trackedGetMemHighwater :: (HasCallStack, MonadIO m) => m Word64
- trackedMalloc :: (HasCallStack, MonadIO m) => Word64 -> m (Ptr ())
- trackedOpen :: (HasCallStack, MonadIO m) => Text -> Int32 -> Int32 -> m Int32
- typeDepth :: (HasCallStack, MonadIO m) => GType -> m Int32
- typeFind :: (HasCallStack, MonadIO m) => Text -> Text -> m GType
- valueGetArea :: (HasCallStack, MonadIO m) => GValue -> m (Ptr (), Word64)
- valueGetArray :: (HasCallStack, MonadIO m) => GValue -> m (Ptr (), Int32, GType, Word64)
- valueGetArrayDouble :: (HasCallStack, MonadIO m) => GValue -> m [Double]
- valueGetArrayImage :: (HasCallStack, MonadIO m) => GValue -> m [Image]
- valueGetArrayInt :: (HasCallStack, MonadIO m) => GValue -> m [Int32]
- valueGetBlob :: (HasCallStack, MonadIO m) => GValue -> m (Ptr (), Word64)
- valueGetRefString :: (HasCallStack, MonadIO m) => GValue -> m (Text, Word64)
- valueGetSaveString :: (HasCallStack, MonadIO m) => GValue -> m Text
- valueIsNull :: (HasCallStack, MonadIO m) => GParamSpec -> GValue -> m Bool
- valueSetArea :: (HasCallStack, MonadIO m) => GValue -> CallbackFn -> m ()
- valueSetArray :: (HasCallStack, MonadIO m) => Int32 -> GType -> Word64 -> m GValue
- valueSetArrayDouble :: (HasCallStack, MonadIO m) => GValue -> Maybe [Double] -> m ()
- valueSetArrayImage :: (HasCallStack, MonadIO m) => GValue -> Int32 -> m ()
- valueSetArrayInt :: (HasCallStack, MonadIO m) => GValue -> Maybe [Int32] -> m ()
- valueSetArrayObject :: (HasCallStack, MonadIO m) => Int32 -> m GValue
- valueSetBlob :: (HasCallStack, MonadIO m) => CallbackFn -> Word64 -> m GValue
- valueSetBlobFree :: (HasCallStack, MonadIO m) => GValue -> Ptr () -> Word64 -> m ()
- valueSetRefString :: (HasCallStack, MonadIO m) => Text -> m GValue
- valueSetSaveString :: (HasCallStack, MonadIO m) => Text -> m GValue
- version :: (HasCallStack, MonadIO m) => Int32 -> m Int32
- versionString :: (HasCallStack, MonadIO m) => m Text
Methods
addOptionEntries
:: (HasCallStack, MonadIO m) | |
=> OptionGroup |
|
-> m () |
Add the standard vips GOptionEntry
to a GOptionGroup
.
See also: optionGroupNew
.
blockUntrustedSet
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m () |
Set the block state on all untrusted operations.
vips_block_untrusted_set( TRUE );
Will block all untrusted operations from running.
Use vips -l
at the command-line to see the class hierarchy and which
operations are marked as untrusted.
Set the environment variable VIPS_BLOCK_UNTRUSTED
to block all untrusted
operations on init
.
cacheDropAll
cacheDropAll :: (HasCallStack, MonadIO m) => m () Source #
Drop the whole operation cache, handy for leak tracking. Also called
automatically on shutdown
.
cacheGetMax
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: the maximum number of operations we keep in cache |
Get the maximum number of operations we keep in cache.
cacheGetMaxFiles
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: the maximum number of tracked files we allow |
Get the maximum number of tracked files we allow before we start dropping
cached operations. See trackedGetFiles
.
libvips only tracks file descriptors it allocates, it can't track ones
allocated by external libraries. If you use an operation like
vips_magickload()
, most of the descriptors it uses won't be included.
See also: trackedGetFiles
.
cacheGetMaxMem
:: (HasCallStack, MonadIO m) | |
=> m Word64 | Returns: the maximum amount of tracked memory we allow |
Get the maximum amount of tracked memory we allow before we start dropping
cached operations. See trackedGetMem
.
See also: trackedGetMem
.
cacheGetSize
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: get the current number of operations in cache. |
Get the current number of operations in cache.
cacheOperationAdd
:: (HasCallStack, MonadIO m, IsOperation a) | |
=> a |
|
-> m () |
Add a built operation to the cache. The cache will ref the operation.
cacheOperationBuild
:: (HasCallStack, MonadIO m, IsOperation a) | |
=> a |
|
-> m Operation | Returns: The built operation. |
A binding-friendly version of vips_cache_operation_buildp()
.
After calling this, operation
has the same ref count as when it went in,
and the result must be freed with objectUnrefOutputs
and
objectUnref
.
cacheOperationLookup
:: (HasCallStack, MonadIO m, IsOperation a) | |
=> a |
|
-> m Operation | Returns: the cache hit, if any. |
Look up an unbuilt operation
in the cache. If we get a hit, ref and
return the old operation. If there's no hit, return NULL.
cachePrint
cachePrint :: (HasCallStack, MonadIO m) => m () Source #
Print the whole operation cache to stdout. Handy for debugging.
cacheSetDump
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m () |
Handy for debugging. Print the operation cache to stdout just before exit.
See also: cacheSetTrace
.
cacheSetMax
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m () |
Set the maximum number of operations we keep in cache.
cacheSetMaxFiles
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m () |
Set the maximum number of tracked files we allow before we start dropping
cached operations. See trackedGetFiles
.
See also: trackedGetFiles
.
cacheSetMaxMem
:: (HasCallStack, MonadIO m) | |
=> Word64 |
|
-> m () |
Set the maximum amount of tracked memory we allow before we start dropping
cached operations. See trackedGetMem
.
libvips only tracks memory it allocates, it can't track memory allocated by
external libraries. If you use an operation like vips_magickload()
, most of
the memory it uses won't be included.
See also: trackedGetMem
.
cacheSetTrace
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m () |
Handy for debugging. Print operation cache actions to stdout as we run.
You can set the environment variable VIPS_TRACE
to turn this option on, or
use the command-line flag --vips-cache-trace
.
See also: cacheSetDump
.
callArgv
callArgv :: (HasCallStack, MonadIO m, IsOperation a) => a -> Int32 -> Text -> m Int32 Source #
No description available in the introspection data.
callOptions
callOptions :: (HasCallStack, MonadIO m, IsOperation a) => OptionGroup -> a -> m () Source #
No description available in the introspection data.
check8or16
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is 8 or 16-bit integer, signed or unsigned. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkBandno
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> Int32 |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
bandno
should be a valid band number (ie. 0 to im->Bands - 1), or can be
-1, meaning all bands.
If not, set an error message
and return non-zero.
See also: vips_error()
.
checkBands
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> Int32 |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image has bands
bands.
Otherwise set an error message
and return non-zero.
See also: vips_error()
.
checkBands1or3
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image has either one or three bands. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkBands1orn
:: (HasCallStack, MonadIO m, IsImage a, IsImage b) | |
=> Text |
|
-> a |
|
-> b |
|
-> m Int32 | Returns: 0 on OK, or -1 on error. |
Check that the images have the same number of bands, or that one of the images has just 1 band. If not, set an error message and return non-zero.
See also: vips_error()
.
checkBands1ornUnary
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> Int32 |
|
-> m Int32 | Returns: 0 on OK, or -1 on error. |
Check that an image has 1 or n
bands. Handy for unary operations, cf.
checkBands1orn
.
If not, set an error message
and return non-zero.
See also: checkBands1orn
.
checkBandsAtleast
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> Int32 |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image has at least bands
bands.
Otherwise set an error message
and return non-zero.
See also: vips_error()
.
checkBandsSame
:: (HasCallStack, MonadIO m, IsImage a, IsImage b) | |
=> Text |
|
-> a |
|
-> b |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the images have the same number of bands. If not, set an error message and return non-zero.
See also: vips_error()
.
checkCoding
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> Coding |
|
-> m Int32 | Returns: 0 on OK, or -1 on error. |
Check that the image has the required coding
.
If not, set an error message
and return non-zero.
See also: vips_error()
.
checkCodingKnown
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 on OK, or -1 on error. |
Check that the image is uncoded, LABQ coded or RAD coded. If not, set an error message and return non-zero.
See also: vips_error()
.
checkCodingNoneorlabq
checkCodingNoneorlabq Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 on OK, or -1 on error. |
Check that the image is uncoded or LABQ coded. If not, set an error message and return non-zero.
See also: vips_error()
.
checkCodingSame
:: (HasCallStack, MonadIO m, IsImage a, IsImage b) | |
=> Text |
|
-> a |
|
-> b |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the images have the same coding. If not, set an error message and return non-zero.
See also: vips_error()
.
checkComplex
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is complex. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkFormat
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> BandFormat |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image has the specified format. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkFormatSame
:: (HasCallStack, MonadIO m, IsImage a, IsImage b) | |
=> Text |
|
-> a |
|
-> b |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the images have the same format. If not, set an error message and return non-zero.
See also: vips_error()
.
checkHist
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Histogram images must have width or height 1, and must not have more than 65536 elements. Return 0 if the image will pass as a histogram, or -1 and set an error message otherwise.
See also: vips_error()
.
checkInt
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is in one of the integer formats. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkMatrix
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m (Int32, Image) | Returns: 0 if OK, -1 otherwise. |
Matrix images must have width and height less than 100000 and have 1 band.
Return 0 if the image will pass as a matrix, or -1 and set an error message otherwise.
out
is set to be im
cast to double and stored in memory. Use
VIPS_MATRIX()
to address values in out
.
You must unref out
when you are done with it.
See also: VIPS_MATRIX()
, vips_object_local()
checkMono
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image has exactly one band. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkNoncomplex
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is not complex. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkOddsquare
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is square and that the sides are odd. If not, set an error message and return non-zero.
See also: vips_error()
.
checkPrecisionIntfloat
checkPrecisionIntfloat Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Precision |
|
-> m Int32 | Returns: 0 on OK, or -1 on error. |
Check that prec
image is either float or int.
If not, set an error message
and return non-zero.
See also: vips_error()
.
checkSeparable
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Separable matrix images must have width or height 1. Return 0 if the image will pass, or -1 and set an error message otherwise.
See also: vips_error()
.
checkSizeSame
:: (HasCallStack, MonadIO m, IsImage a, IsImage b) | |
=> Text |
|
-> a |
|
-> b |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the images have the same size. If not, set an error message and return non-zero.
See also: vips_error()
.
checkTwocomponents
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is has two "components", ie. is a one-band complex or a two-band non-complex. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkU8or16
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is 8 or 16-bit unsigned integer. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkU8or16orf
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is 8 or 16-bit unsigned integer, or float. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkUint
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is in one of the unsigned integer formats. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkUintorf
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that the image is unsigned int or float. Otherwise set an error message and return non-zero.
See also: vips_error()
.
checkUncoded
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> a |
|
-> m Int32 | Returns: 0 on OK, or -1 on error. |
Check that the image is not coded. If not, set an error message and return non-zero.
See also: vips_error()
.
checkVector
:: (HasCallStack, MonadIO m, IsImage a) | |
=> Text |
|
-> Int32 |
|
-> a |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Operations with a vector constant need a 1-element vector, or a vector with the same number of elements as there are bands in the image, or a 1-band image and a many-element vector.
See also: vips_error()
.
checkVectorLength
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Int32 |
|
-> Int32 |
|
-> m Int32 | Returns: 0 if OK, -1 otherwise. |
Check that n
== len
.
See also: vips_error()
.
classFind
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m ObjectClass | Returns: the found class. |
Search below basename
, return the first class whose name or nickname
matches.
See also: typeFind
colAb2Ch
colAb2Ch :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> m () Source #
No description available in the introspection data.
colAb2h
:: (HasCallStack, MonadIO m) | |
=> Double |
|
-> Double |
|
-> m Double | Returns: Hue (degrees) |
No description available in the introspection data.
colC2Ccmc
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> m Float | Returns: Ccmc. |
Calculate Ccmc from C.
colCcmc2C
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> m Float | Returns: C. |
Calculate C from Ccmc using a table.
Call colMakeTablesCMC
at
least once before using this function.
colCh2ab
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m () |
Calculate ab from Ch, h in degrees.
colCh2hcmc
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> m Float | Returns: hcmc. |
Calculate hcmc from C and h.
colChcmc2h
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> m Float | Returns: h. |
Calculate h from C and hcmc, using a table.
Call colMakeTablesCMC
at
least once before using this function.
colDE00
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m Float | Returns: CIE dE2000 colour difference. |
CIEDE2000, from:
Luo, Cui, Rigg, "The Development of the CIE 2000 Colour-Difference Formula: CIEDE2000", COLOR research and application, pp 340
colL2Lcmc
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> m Float | Returns: Lcmc |
Calculate Lcmc from L.
colLab2XYZ
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> m (Float, Float, Float) |
Calculate XYZ from Lab, D65.
See also: vips_Lab2XYZ()
.
colLcmc2L
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> m Float | Returns: L* |
Calculate L from Lcmc using a table. Call colMakeTablesCMC
at
least once before using this function.
colMakeTablesCMC
colMakeTablesCMC :: (HasCallStack, MonadIO m) => m () Source #
Make the lookup tables for cmc.
colSRGB2scRGB16
colSRGB2scRGB16 :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Float -> Float -> Float -> m Int32 Source #
No description available in the introspection data.
colSRGB2scRGB8
colSRGB2scRGB8 :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Float -> Float -> Float -> m Int32 Source #
No description available in the introspection data.
colScRGB2BW16
colScRGB2BW16 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> m Int32 Source #
No description available in the introspection data.
colScRGB2BW8
colScRGB2BW8 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> m Int32 Source #
No description available in the introspection data.
colScRGB2XYZ
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> m (Int32, Float, Float, Float) |
Turn scRGB into XYZ.
See also: vips_scRGB2XYZ()
.
colScRGB2sRGB16
colScRGB2sRGB16 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> Int32 -> Int32 -> m Int32 Source #
No description available in the introspection data.
colScRGB2sRGB8
colScRGB2sRGB8 :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Int32 -> Int32 -> Int32 -> Int32 -> m Int32 Source #
No description available in the introspection data.
colXYZ2Lab
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> m (Float, Float, Float) |
Calculate XYZ from Lab, D65.
See also: vips_XYZ2Lab()
.
colXYZ2scRGB
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> m (Int32, Float, Float, Float) |
Turn XYZ into scRGB.
See also: vips_XYZ2scRGB()
.
concurrencyGet
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: number of worker threads to use. |
Returns the number of worker threads that vips should use when running a
VipsThreadPool
.
vips gets this values from these sources in turn:
If concurrencySet
has been called, this value is used. The special
value 0 means "default". You can also use the command-line argument
"--vips-concurrency" to set this value.
If concurrencySet
has not been called and no command-line argument
was used, vips uses the value of the environment variable VIPS_CONCURRENCY,
If VIPS_CONCURRENCY has not been set, vips finds the number of hardware threads that the host machine can run in parallel and uses that value.
The final value is clipped to the range 1 - 1024.
See also: concurrencyGet
.
concurrencySet
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m () |
Sets the number of worker threads that vips should use when running a
VipsThreadPool
.
The special value 0 means "default". In this case, the number of threads is set by the environment variable VIPS_CONCURRENCY, or if that is not set, the number of threads available on the host machine.
See also: concurrencyGet
.
errorBuffer
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: the error buffer as a C string which must not be freed |
Get a pointer to the start of the error buffer as a C string. The string is owned by the error system and must not be freed.
See also: errorClear
.
errorBufferCopy
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: a copy of the libvips error buffer |
Return a copy of the vips error buffer, and clear it.
errorClear
errorClear :: (HasCallStack, MonadIO m) => m () Source #
Clear and reset the error buffer. This is typically called after presenting an error to the user.
See also: errorBuffer
.
errorFreeze
errorFreeze :: (HasCallStack, MonadIO m) => m () Source #
Stop errors being logged. Use errorThaw
to unfreeze. You can
nest freeze/thaw pairs.
errorG
:: (HasCallStack, MonadIO m) | |
=> m () | (Can throw |
errorThaw
errorThaw :: (HasCallStack, MonadIO m) => m () Source #
Reenable error logging.
filenameGetFilename
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Text | Returns: transfer full: just the filename component. |
Given a vips filename like "fred.jpg[Q=90]", return a new string of just the filename part, "fred.jpg" in this case.
Useful for language bindings.
See also: filenameGetOptions
.
filenameGetOptions
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Text | Returns: transfer full: just the options component. |
Given a vips filename like "fred.jpg[Q=90]", return a new string of just the options part, "[Q=90]" in this case.
Useful for language bindings.
See also: filenameGetFilename
.
foreignFlags
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m [ForeignFlags] | Returns: the flags for |
Return the flags for filename
using loader
.
loader
is something like "tiffload" or "VipsForeignLoadTiff".
formatSizeof
:: (HasCallStack, MonadIO m) | |
=> BandFormat |
|
-> m Word64 | Returns: number of bytes for a band format. |
No description available in the introspection data.
gError
:: (HasCallStack, MonadIO m) | |
=> m () | (Can throw |
getArgv0
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: a pointer to an internal copy of the
argv0 string passed to
|
See also: VIPS_INIT()
.
getDiscThreshold
:: (HasCallStack, MonadIO m) | |
=> m Word64 | Returns: disc threshold in bytes. |
Return the number of bytes at which we flip between open via memory and
open via disc. This defaults to 100mb, but can be changed with the
VIPS_DISC_THRESHOLD environment variable or the --vips-disc-threshold
command-line flag. See vips_image_new_from_file()
.
getPrgname
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: a pointer to an internal copy of the program name. Do not free this value |
Return the program name. This can be useful for the user tio see,.
See also: VIPS_INIT()
.
guessLibdir
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m Text | Returns: the libdir as a static string, do not free. |
guessLibdir
tries to guess the install directory (usually the
configure libdir, or $prefix/lib). You should pass
in the value of argv[0] (the name your program was run as) as a clue to
help it out, plus the name of the environment variable you let the user
override your package install area with (eg. "VIPSHOME").
On success, guessLibdir
returns the libdir it discovered, and as a
side effect, sets the prefix environment variable (if it's not set).
Don't free the return string!
See also: guessPrefix
.
guessPrefix
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m Text | Returns: the install prefix as a static string, do not free. |
guessPrefix
tries to guess the install directory. You should pass
in the value of argv[0] (the name your program was run as) as a clue to
help it out, plus the name of the environment variable you let the user
override your package install area with (eg. "VIPSHOME").
On success, guessPrefix
returns the prefix it discovered, and as a
side effect, sets the environment variable (if it's not set).
Don't free the return string!
See also: guessLibdir
.
iccIsCompatibleProfile
iccIsCompatibleProfile :: (HasCallStack, MonadIO m, IsImage a) => a -> Ptr () -> Word64 -> m Bool Source #
No description available in the introspection data.
iccPresent
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: non-zero if the ICC library is present. |
VIPS can optionally be built without the ICC library. Use this function to test for its availability.
init
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Int32 | Returns: 0 on success, -1 otherwise |
This function starts up libvips, see VIPS_INIT()
.
This function is for bindings which need to start up vips. C programs
should use the VIPS_INIT()
macro, which does some extra checks.
See also: VIPS_INIT()
.
leakSet
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m () |
Turn on or off vips leak checking. See also --vips-leak,
addOptionEntries
and the VIPS_LEAK
environment variable.
You should call this very early in your program.
malloc
:: (HasCallStack, MonadIO m, IsObject a) | |
=> Maybe a | |
-> Word64 |
|
-> m (Ptr ()) | Returns: a pointer to the allocated memory. |
malloc
local to object
, that is, the memory will be automatically
freed for you when the object is closed. If object
is Nothing
, you need to
free the memory explicitly with free
.
This function cannot fail. See trackedMalloc
if you are
allocating large amounts of memory.
See also: trackedMalloc
.
nicknameFind
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> m Text | Returns: the class nickname. |
Return the VIPS nickname for a GType
. Handy for language bindings.
objectSetMember_
objectSetMember_ :: (HasCallStack, MonadIO m, IsObject a, IsObject b, IsObject c) => a -> GParamSpec -> b -> c -> m () Source #
No description available in the introspection data.
pathFilename7
pathFilename7 :: (HasCallStack, MonadIO m) => Text -> m Text Source #
No description available in the introspection data.
pathMode7
pathMode7 :: (HasCallStack, MonadIO m) => Text -> m Text Source #
No description available in the introspection data.
pythagoras
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m Float |
Pythagorean distance between two points in colour space. Lab/XYZ/CMC etc.
shutdown
shutdown :: (HasCallStack, MonadIO m) => m () Source #
Call this to drop caches, close plugins, terminate background threads, and finalize any internal library testing.
shutdown
is optional. If you don't call it, your platform will
clean up for you. The only negative consequences are that the leak checker
and the profiler will not work.
You may call VIPS_INIT()
many times and shutdown
many times, but you
must not call VIPS_INIT()
after shutdown
. In other words, you cannot
stop and restart libvips.
See also: vips_profile_set()
, leakSet
.
strdup
threadShutdown
threadShutdown :: (HasCallStack, MonadIO m) => m () Source #
Free any thread-private data and flush any profiling information.
This function needs to be called when a thread that has been using vips
exits. It is called for you by shutdown
and for any threads created
within the VipsThreadPool
.
You will need to call it from threads created in other ways or there will be memory leaks. If you do not call it, vips will generate a warning message.
It may be called many times, and you can continue using vips after calling it. Calling it too often will reduce performance.
trackedClose
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m Int32 | Returns: a file descriptor, or -1 on error. |
Exactly as close(2), but update the number of files currently open via
trackedGetFiles
. This is used
by the vips operation cache to drop cache when the number of files
available is low.
You must only close file descriptors opened with trackedOpen
.
See also: trackedOpen
, trackedGetFiles
.
trackedFree
:: (HasCallStack, MonadIO m) | |
=> Ptr () |
|
-> m () |
Only use it to free
memory that was previously allocated with trackedMalloc
with a
Nothing
first argument.
See also: trackedMalloc
.
trackedGetAllocs
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: the number of active allocations |
Returns the number of active allocations.
trackedGetFiles
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: the number of open files |
Returns the number of open files.
trackedGetMem
:: (HasCallStack, MonadIO m) | |
=> m Word64 | Returns: the number of currently allocated bytes |
trackedGetMemHighwater
trackedGetMemHighwater Source #
:: (HasCallStack, MonadIO m) | |
=> m Word64 | Returns: the largest number of currently allocated bytes |
Returns the largest number of bytes simultaneously allocated via
trackedMalloc
. Handy for estimating max memory requirements for a
program.
trackedMalloc
:: (HasCallStack, MonadIO m) | |
=> Word64 |
|
-> m (Ptr ()) | Returns: a pointer to the allocated memory, or |
Allocate an area of memory that will be tracked by trackedGetMem
and friends.
If allocation fails, malloc
returns Nothing
and
sets an error message.
You must only free the memory returned with trackedFree
.
See also: trackedFree
, malloc
.
trackedOpen
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Int32 |
|
-> Int32 |
|
-> m Int32 | Returns: a file descriptor, or -1 on error. |
Exactly as open(2), but the number of files currently open via
trackedOpen
is available via trackedGetFiles
. This is used
by the vips operation cache to drop cache when the number of files
available is low.
You must only close the file descriptor with trackedClose
.
pathname
should be utf8.
See also: trackedClose
, trackedGetFiles
.
typeDepth
typeDepth :: (HasCallStack, MonadIO m) => GType -> m Int32 Source #
No description available in the introspection data.
typeFind
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m GType | Returns: the |
valueGetArea
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m (Ptr (), Word64) | Returns: The pointer held by |
Get the pointer from an area. Don't touch count (area is static).
valueGetArray
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m (Ptr (), Int32, GType, Word64) | Returns: The array address. |
Return the pointer to the array held by value
.
Optionally return the other properties of the array in n
, type
,
sizeofType
.
See also: valueSetArray
.
valueGetArrayDouble
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m [Double] | Returns: The array address. |
Return the start of the array of doubles held by value
.
optionally return the number of elements in n
.
See also: arrayDoubleNew
.
valueGetArrayImage
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m [Image] | Returns: The array address. |
Return the start of the array of images held by value
.
optionally return the number of elements in n
.
See also: valueSetArrayImage
.
valueGetArrayInt
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m [Int32] | Returns: The array address. |
Return the start of the array of ints held by value
.
optionally return the number of elements in n
.
See also: arrayIntNew
.
valueGetBlob
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m (Ptr (), Word64) | Returns: The pointer held by |
Returns the data pointer from a blob. Optionally returns the length too.
blobs are things like ICC profiles or EXIF data. They are relocatable, and are saved to VIPS files for you coded as base64 inside the XML. They are copied by copying reference-counted pointers.
See also: valueSetBlob
valueGetRefString
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m (Text, Word64) | Returns: The C string held by |
Get the C string held internally by the GValue
.
valueGetSaveString
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m Text | Returns: The C string held by |
Get the C string held internally by the GValue.
valueIsNull
valueIsNull :: (HasCallStack, MonadIO m) => GParamSpec -> GValue -> m Bool Source #
No description available in the introspection data.
valueSetArea
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> CallbackFn |
|
-> m () |
Set value to be a ref-counted area of memory with a free function.
valueSetArray
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> GType |
|
-> Word64 |
|
-> m GValue |
Set value
to be an array of things.
This allocates memory but does not initialise the contents: get the pointer and write instead.
valueSetArrayDouble
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> Maybe [Double] |
|
-> m () |
Set value
to hold a copy of array
. Pass in the array length in n
.
See also: arrayDoubleGet
.
valueSetArrayImage
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> Int32 |
|
-> m () |
Set value
to hold an array of images. Pass in the array length in n
.
See also: arrayImageGet
.
valueSetArrayInt
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> Maybe [Int32] |
|
-> m () |
Set value
to hold a copy of array
. Pass in the array length in n
.
See also: arrayIntGet
.
valueSetArrayObject
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m GValue |
Set value
to hold an array of GObject
. Pass in the array length in n
.
See also: vips_value_get_array_object()
.
valueSetBlob
:: (HasCallStack, MonadIO m) | |
=> CallbackFn |
|
-> Word64 |
|
-> m GValue |
Sets value
to hold a data
. When value
is freed, data
will be
freed with freeFn
. value
also holds a note of the size of the memory
area.
blobs are things like ICC profiles or EXIF data. They are relocatable, and are saved to VIPS files for you coded as base64 inside the XML. They are copied by copying reference-counted pointers.
See also: valueGetBlob
valueSetBlobFree
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> Ptr () |
|
-> Word64 |
|
-> m () |
Just like valueSetBlob
, but when
value
is freed, data
will be
freed with free
.
This can be easier to call for language bindings.
See also: valueSetBlob
valueSetRefString
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m GValue |
Copies the C string str
into value
.
vips_ref_string are immutable C strings that are copied between images by
copying reference-counted pointers, making them much more efficient than
regular GValue
strings.
str
should be a valid utf-8 string.
valueSetSaveString
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m GValue |
Copies the C string into value
.
str
should be a valid utf-8 string.
version
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m Int32 | Returns: library version number |
Get the major, minor or micro library version, with flag
values 0, 1 and
2.
Get the ABI current, revision and age (as used by libtool) with flag
values 3, 4, 5.
versionString
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: a static version string |
Get the VIPS version as a static string, including a build date and time. Do not free.