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 |
- Exported types
- Methods
- autorotRemoveAngle
- foreignLoadInvalidate
- iccAc2rc
- imageCopyMemory
- imageDecode
- imageDecodePredict
- imageEncode
- imageGet
- imageGetArea
- imageGetArrayInt
- imageGetAsString
- imageGetBands
- imageGetBlob
- imageGetCoding
- imageGetData
- imageGetDouble
- imageGetFields
- imageGetFilename
- imageGetFormat
- imageGetHeight
- imageGetHistory
- imageGetImage
- imageGetInt
- imageGetInterpretation
- imageGetMode
- imageGetNPages
- imageGetOffset
- imageGetPageHeight
- imageGetScale
- imageGetString
- imageGetTypeof
- imageGetWidth
- imageGetXoffset
- imageGetXres
- imageGetYoffset
- imageGetYres
- imageGuessFormat
- imageGuessInterpretation
- imageHasalpha
- imageHistoryArgs
- imageInitFields
- imageInplace
- imageInvalidateAll
- imageIsMSBfirst
- imageIsSequential
- imageIsfile
- imageIskilled
- imageIspartial
- imageMinimiseAll
- imagePioInput
- imagePioOutput
- imagePrintField
- imageRemove
- imageSet
- imageSetArea
- imageSetArrayInt
- imageSetBlob
- imageSetBlobCopy
- imageSetDeleteOnClose
- imageSetDouble
- imageSetImage
- imageSetInt
- imageSetKill
- imageSetProgress
- imageSetString
- imageWioInput
- imageWrite
- imageWriteLine
- imageWritePrepare
- imageWriteToMemory
- matrixFromArray
- memory
- new
- newFromFileRW
- newFromFileRaw
- newFromImage
- newFromImage1
- newFromMemory
- newFromMemoryCopy
- newMatrix
- newMatrixFromArray
- newMemory
- newTempFile
- reorderMarginHint
- reorderPrepareMany
- Properties
- Signals
An image. These can represent an image on disc, a memory buffer, an image in the process of being written to disc or a partially evaluated image in memory.
Synopsis
- newtype Image = Image (ManagedPtr Image)
- class (GObject o, IsDescendantOf Image o) => IsImage o
- toImage :: (MonadIO m, IsImage o) => o -> m Image
- imageAutorotRemoveAngle :: (HasCallStack, MonadIO m, IsImage a) => a -> m ()
- imageForeignLoadInvalidate :: (HasCallStack, MonadIO m, IsImage a) => a -> m ()
- imageIccAc2rc :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m (Int32, Image)
- imageImageCopyMemory :: (HasCallStack, MonadIO m, IsImage a) => a -> m Image
- imageImageDecode :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Int32, Image)
- imageImageDecodePredict :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Int32, Int32, BandFormat)
- imageImageEncode :: (HasCallStack, MonadIO m, IsImage a) => a -> Coding -> m (Int32, Image)
- imageImageGet :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m GValue
- imageImageGetArea :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m (Int32, Ptr ())
- imageImageGetArrayInt :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Int32 -> Int32 -> m Int32
- imageImageGetAsString :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Text -> m Int32
- imageImageGetBands :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageGetBlob :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Ptr () -> Word64 -> m Int32
- imageImageGetCoding :: (HasCallStack, MonadIO m, IsImage a) => a -> m Coding
- imageImageGetData :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Ptr ())
- imageImageGetDouble :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Double -> m Int32
- imageImageGetFields :: (HasCallStack, MonadIO m, IsImage a) => a -> m [Text]
- imageImageGetFilename :: (HasCallStack, MonadIO m, IsImage a) => a -> m Text
- imageImageGetFormat :: (HasCallStack, MonadIO m, IsImage a) => a -> m BandFormat
- imageImageGetHeight :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageGetHistory :: (HasCallStack, MonadIO m, IsImage a) => a -> m Text
- imageImageGetImage :: (HasCallStack, MonadIO m, IsImage a, IsImage b) => a -> Text -> b -> m Int32
- imageImageGetInt :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m (Int32, Int32)
- imageImageGetInterpretation :: (HasCallStack, MonadIO m, IsImage a) => a -> m Interpretation
- imageImageGetMode :: (HasCallStack, MonadIO m, IsImage a) => a -> m Text
- imageImageGetNPages :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageGetOffset :: (HasCallStack, MonadIO m, IsImage a) => a -> m Double
- imageImageGetPageHeight :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageGetScale :: (HasCallStack, MonadIO m, IsImage a) => a -> m Double
- imageImageGetString :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Text -> m Int32
- imageImageGetTypeof :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m GType
- imageImageGetWidth :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageGetXoffset :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageGetXres :: (HasCallStack, MonadIO m, IsImage a) => a -> m Double
- imageImageGetYoffset :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageGetYres :: (HasCallStack, MonadIO m, IsImage a) => a -> m Double
- imageImageGuessFormat :: (HasCallStack, MonadIO m, IsImage a) => a -> m BandFormat
- imageImageGuessInterpretation :: (HasCallStack, MonadIO m, IsImage a) => a -> m Interpretation
- imageImageHasalpha :: (HasCallStack, MonadIO m, IsImage a) => a -> m Bool
- imageImageHistoryArgs :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> [Text] -> m Int32
- imageImageInitFields :: (HasCallStack, MonadIO m, IsImage a) => a -> Int32 -> Int32 -> Int32 -> BandFormat -> Coding -> Interpretation -> Double -> Double -> m ()
- imageImageInplace :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageInvalidateAll :: (HasCallStack, MonadIO m, IsImage a) => a -> m ()
- imageImageIsMSBfirst :: (HasCallStack, MonadIO m, IsImage a) => a -> m Bool
- imageImageIsSequential :: (HasCallStack, MonadIO m, IsImage a) => a -> m Bool
- imageImageIsfile :: (HasCallStack, MonadIO m, IsImage a) => a -> m Bool
- imageImageIskilled :: (HasCallStack, MonadIO m, IsImage a) => a -> m Bool
- imageImageIspartial :: (HasCallStack, MonadIO m, IsImage a) => a -> m Bool
- imageImageMinimiseAll :: (HasCallStack, MonadIO m, IsImage a) => a -> m ()
- imageImagePioInput :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImagePioOutput :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImagePrintField :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m ()
- imageImageRemove :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m Bool
- imageImageSet :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> GValue -> m ()
- imageImageSetArea :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> CallbackFn -> m ()
- imageImageSetArrayInt :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Maybe [Int32] -> m ()
- imageImageSetBlob :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> CallbackFn -> Word64 -> m ()
- imageImageSetBlobCopy :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Ptr () -> Word64 -> m ()
- imageImageSetDeleteOnClose :: (HasCallStack, MonadIO m, IsImage a) => a -> Bool -> m ()
- imageImageSetDouble :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Double -> m ()
- imageImageSetImage :: (HasCallStack, MonadIO m, IsImage a, IsImage b) => a -> Text -> b -> m ()
- imageImageSetInt :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Int32 -> m ()
- imageImageSetKill :: (HasCallStack, MonadIO m, IsImage a) => a -> Bool -> m ()
- imageImageSetProgress :: (HasCallStack, MonadIO m, IsImage a) => a -> Bool -> m ()
- imageImageSetString :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Text -> m ()
- imageImageWioInput :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageWrite :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Int32, Image)
- imageImageWriteLine :: (HasCallStack, MonadIO m, IsImage a) => a -> Int32 -> Word8 -> m Int32
- imageImageWritePrepare :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageImageWriteToMemory :: (HasCallStack, MonadIO m, IsImage a) => a -> m ByteString
- imageMatrixFromArray :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> [Double] -> m Image
- imageMemory :: (HasCallStack, MonadIO m) => m Image
- imageNew :: (HasCallStack, MonadIO m) => m Image
- imageNewFromFileRW :: (HasCallStack, MonadIO m) => Text -> m Image
- imageNewFromFileRaw :: (HasCallStack, MonadIO m) => Text -> Int32 -> Int32 -> Int32 -> Word64 -> m Image
- imageNewFromImage :: (HasCallStack, MonadIO m, IsImage a) => a -> [Double] -> m Image
- imageNewFromImage1 :: (HasCallStack, MonadIO m, IsImage a) => a -> Double -> m Image
- imageNewFromMemory :: (HasCallStack, MonadIO m) => ByteString -> Int32 -> Int32 -> Int32 -> BandFormat -> m Image
- imageNewFromMemoryCopy :: (HasCallStack, MonadIO m) => ByteString -> Int32 -> Int32 -> Int32 -> BandFormat -> m Image
- imageNewMatrix :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Image
- imageNewMatrixFromArray :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> [Double] -> m Image
- imageNewMemory :: (HasCallStack, MonadIO m) => m Image
- imageNewTempFile :: (HasCallStack, MonadIO m) => Text -> m Image
- imageReorderMarginHint :: (HasCallStack, MonadIO m, IsImage a) => a -> Int32 -> m ()
- imageReorderPrepareMany :: (HasCallStack, MonadIO m, IsImage a) => a -> [Region] -> Rect -> m Int32
- constructImageBands :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getImageBands :: (MonadIO m, IsImage o) => o -> m Int32
- setImageBands :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- constructImageCoding :: (IsImage o, MonadIO m) => Coding -> m (GValueConstruct o)
- getImageCoding :: (MonadIO m, IsImage o) => o -> m Coding
- setImageCoding :: (MonadIO m, IsImage o) => o -> Coding -> m ()
- constructImageDemand :: (IsImage o, MonadIO m) => DemandStyle -> m (GValueConstruct o)
- getImageDemand :: (MonadIO m, IsImage o) => o -> m DemandStyle
- setImageDemand :: (MonadIO m, IsImage o) => o -> DemandStyle -> m ()
- clearImageFilename :: (MonadIO m, IsImage o) => o -> m ()
- constructImageFilename :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o)
- getImageFilename :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- setImageFilename :: (MonadIO m, IsImage o) => o -> Text -> m ()
- constructImageForeignBuffer :: (IsImage o, MonadIO m) => Ptr () -> m (GValueConstruct o)
- getImageForeignBuffer :: (MonadIO m, IsImage o) => o -> m (Ptr ())
- setImageForeignBuffer :: (MonadIO m, IsImage o) => o -> Ptr () -> m ()
- constructImageFormat :: (IsImage o, MonadIO m) => BandFormat -> m (GValueConstruct o)
- getImageFormat :: (MonadIO m, IsImage o) => o -> m BandFormat
- setImageFormat :: (MonadIO m, IsImage o) => o -> BandFormat -> m ()
- constructImageHeight :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getImageHeight :: (MonadIO m, IsImage o) => o -> m Int32
- setImageHeight :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- constructImageInterpretation :: (IsImage o, MonadIO m) => Interpretation -> m (GValueConstruct o)
- getImageInterpretation :: (MonadIO m, IsImage o) => o -> m Interpretation
- setImageInterpretation :: (MonadIO m, IsImage o) => o -> Interpretation -> m ()
- constructImageKill :: (IsImage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getImageKill :: (MonadIO m, IsImage o) => o -> m Bool
- setImageKill :: (MonadIO m, IsImage o) => o -> Bool -> m ()
- clearImageMode :: (MonadIO m, IsImage o) => o -> m ()
- constructImageMode :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o)
- getImageMode :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- setImageMode :: (MonadIO m, IsImage o) => o -> Text -> m ()
- constructImageSizeofHeader :: (IsImage o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getImageSizeofHeader :: (MonadIO m, IsImage o) => o -> m Word64
- setImageSizeofHeader :: (MonadIO m, IsImage o) => o -> Word64 -> m ()
- constructImageWidth :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getImageWidth :: (MonadIO m, IsImage o) => o -> m Int32
- setImageWidth :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- constructImageXoffset :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getImageXoffset :: (MonadIO m, IsImage o) => o -> m Int32
- setImageXoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- constructImageXres :: (IsImage o, MonadIO m) => Double -> m (GValueConstruct o)
- getImageXres :: (MonadIO m, IsImage o) => o -> m Double
- setImageXres :: (MonadIO m, IsImage o) => o -> Double -> m ()
- constructImageYoffset :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getImageYoffset :: (MonadIO m, IsImage o) => o -> m Int32
- setImageYoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- constructImageYres :: (IsImage o, MonadIO m) => Double -> m (GValueConstruct o)
- getImageYres :: (MonadIO m, IsImage o) => o -> m Double
- setImageYres :: (MonadIO m, IsImage o) => o -> Double -> m ()
- type C_ImageEvalCallback = Ptr () -> Ptr () -> Ptr () -> IO ()
- type ImageEvalCallback = Ptr () -> IO ()
- afterImageEval :: (IsImage a, MonadIO m) => a -> ImageEvalCallback -> m SignalHandlerId
- genClosure_ImageEval :: MonadIO m => ImageEvalCallback -> m (GClosure C_ImageEvalCallback)
- mk_ImageEvalCallback :: C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
- noImageEvalCallback :: Maybe ImageEvalCallback
- onImageEval :: (IsImage a, MonadIO m) => a -> ImageEvalCallback -> m SignalHandlerId
- wrap_ImageEvalCallback :: ImageEvalCallback -> C_ImageEvalCallback
- type C_ImageInvalidateCallback = Ptr () -> Ptr () -> IO ()
- type ImageInvalidateCallback = IO ()
- afterImageInvalidate :: (IsImage a, MonadIO m) => a -> ImageInvalidateCallback -> m SignalHandlerId
- genClosure_ImageInvalidate :: MonadIO m => ImageInvalidateCallback -> m (GClosure C_ImageInvalidateCallback)
- mk_ImageInvalidateCallback :: C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
- noImageInvalidateCallback :: Maybe ImageInvalidateCallback
- onImageInvalidate :: (IsImage a, MonadIO m) => a -> ImageInvalidateCallback -> m SignalHandlerId
- wrap_ImageInvalidateCallback :: ImageInvalidateCallback -> C_ImageInvalidateCallback
- type C_ImageMinimiseCallback = Ptr () -> Ptr () -> IO ()
- type ImageMinimiseCallback = IO ()
- afterImageMinimise :: (IsImage a, MonadIO m) => a -> ImageMinimiseCallback -> m SignalHandlerId
- genClosure_ImageMinimise :: MonadIO m => ImageMinimiseCallback -> m (GClosure C_ImageMinimiseCallback)
- mk_ImageMinimiseCallback :: C_ImageMinimiseCallback -> IO (FunPtr C_ImageMinimiseCallback)
- noImageMinimiseCallback :: Maybe ImageMinimiseCallback
- onImageMinimise :: (IsImage a, MonadIO m) => a -> ImageMinimiseCallback -> m SignalHandlerId
- wrap_ImageMinimiseCallback :: ImageMinimiseCallback -> C_ImageMinimiseCallback
- type C_ImagePostevalCallback = Ptr () -> Ptr () -> Ptr () -> IO ()
- type ImagePostevalCallback = Ptr () -> IO ()
- afterImagePosteval :: (IsImage a, MonadIO m) => a -> ImagePostevalCallback -> m SignalHandlerId
- genClosure_ImagePosteval :: MonadIO m => ImagePostevalCallback -> m (GClosure C_ImagePostevalCallback)
- mk_ImagePostevalCallback :: C_ImagePostevalCallback -> IO (FunPtr C_ImagePostevalCallback)
- noImagePostevalCallback :: Maybe ImagePostevalCallback
- onImagePosteval :: (IsImage a, MonadIO m) => a -> ImagePostevalCallback -> m SignalHandlerId
- wrap_ImagePostevalCallback :: ImagePostevalCallback -> C_ImagePostevalCallback
- type C_ImagePreevalCallback = Ptr () -> Ptr () -> Ptr () -> IO ()
- type ImagePreevalCallback = Ptr () -> IO ()
- afterImagePreeval :: (IsImage a, MonadIO m) => a -> ImagePreevalCallback -> m SignalHandlerId
- genClosure_ImagePreeval :: MonadIO m => ImagePreevalCallback -> m (GClosure C_ImagePreevalCallback)
- mk_ImagePreevalCallback :: C_ImagePreevalCallback -> IO (FunPtr C_ImagePreevalCallback)
- noImagePreevalCallback :: Maybe ImagePreevalCallback
- onImagePreeval :: (IsImage a, MonadIO m) => a -> ImagePreevalCallback -> m SignalHandlerId
- wrap_ImagePreevalCallback :: ImagePreevalCallback -> C_ImagePreevalCallback
- type C_ImageWrittenCallback = Ptr () -> Ptr () -> Ptr () -> IO ()
- type ImageWrittenCallback = Ptr () -> IO ()
- afterImageWritten :: (IsImage a, MonadIO m) => a -> ImageWrittenCallback -> m SignalHandlerId
- genClosure_ImageWritten :: MonadIO m => ImageWrittenCallback -> m (GClosure C_ImageWrittenCallback)
- mk_ImageWrittenCallback :: C_ImageWrittenCallback -> IO (FunPtr C_ImageWrittenCallback)
- noImageWrittenCallback :: Maybe ImageWrittenCallback
- onImageWritten :: (IsImage a, MonadIO m) => a -> ImageWrittenCallback -> m SignalHandlerId
- wrap_ImageWrittenCallback :: ImageWrittenCallback -> C_ImageWrittenCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Image Source # | |
GObject Image Source # | |
Defined in GI.Vips.Objects.Image | |
ManagedPtrNewtype Image Source # | |
Defined in GI.Vips.Objects.Image toManagedPtr :: Image -> ManagedPtr Image | |
TypedObject Image Source # | |
Defined in GI.Vips.Objects.Image | |
HasParentTypes Image Source # | |
Defined in GI.Vips.Objects.Image | |
IsGValue (Maybe Image) Source # | Convert |
Defined in GI.Vips.Objects.Image gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Image -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Image) | |
type ParentTypes Image Source # | |
Defined in GI.Vips.Objects.Image |
class (GObject o, IsDescendantOf Image o) => IsImage o Source #
Instances
(GObject o, IsDescendantOf Image o) => IsImage o Source # | |
Defined in GI.Vips.Objects.Image |
Methods
Click to display all available methods, including inherited ones
Methods
argumentIsset, argumentNeedsstring, autorotRemoveAngle, bindProperty, bindPropertyFull, build, forceFloating, foreignLoadInvalidate, freezeNotify, getv, iccAc2rc, imageCopyMemory, imageDecode, imageDecodePredict, imageEncode, imageGet, imageGetArea, imageGetArrayInt, imageGetAsString, imageGetBands, imageGetBlob, imageGetCoding, imageGetData, imageGetDouble, imageGetFields, imageGetFilename, imageGetFormat, imageGetHeight, imageGetHistory, imageGetImage, imageGetInt, imageGetInterpretation, imageGetMode, imageGetNPages, imageGetOffset, imageGetPageHeight, imageGetScale, imageGetString, imageGetTypeof, imageGetWidth, imageGetXoffset, imageGetXres, imageGetYoffset, imageGetYres, imageGuessFormat, imageGuessInterpretation, imageHasalpha, imageHistoryArgs, imageInitFields, imageInplace, imageInvalidateAll, imageIsMSBfirst, imageIsSequential, imageIsfile, imageIskilled, imageIspartial, imageMap, imageMinimiseAll, imagePioInput, imagePioOutput, imagePrintField, imageRemove, imageSet, imageSetArea, imageSetArrayInt, imageSetBlob, imageSetBlobCopy, imageSetDeleteOnClose, imageSetDouble, imageSetImage, imageSetInt, imageSetKill, imageSetProgress, imageSetString, imageWioInput, imageWrite, imageWriteLine, imageWritePrepare, imageWriteToMemory, isFloating, localCb, notify, notifyByPspec, preclose, printDump, printName, printSummary, ref, refSink, reorderMarginHint, reorderPrepareMany, rewind, runDispose, sanity, stealData, stealQdata, thawNotify, unref, unrefOutputs, watchClosure.
Getters
getArgumentFlags, getArgumentPriority, getArgumentToString, getData, getDescription, getQdata.
Setters
setArgumentFromString, setData, setDataFull, setFromString, setRequired, setStatic.
autorotRemoveAngle
imageAutorotRemoveAngle Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m () |
Remove the orientation tag on image
. Also remove any exif orientation tags.
See also: autorotGetAngle
.
foreignLoadInvalidate
imageForeignLoadInvalidate Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m () |
Loaders can call this on the image they are making if they see a read error from the load library. It signals "invalidate" on the load operation and will cause it to be dropped from cache.
If we know a file will cause a read error, we don't want to cache the failing operation, we want to make sure the image will really be opened again if our caller tries again. For example, a broken file might be replaced by a working one.
iccAc2rc
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> m (Int32, Image) | Returns: 0 on success, -1 on error. |
Transform an image from absolute to relative colorimetry using the MediaWhitePoint stored in the ICC profile.
See also: vips_icc_transform()
, vips_icc_import()
.
imageCopyMemory
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Image |
Make an image which is an area of memory.
If image
is already a memory buffer, just ref and return. If it's a file on
disc or a partial, allocate memory and copy the image to it.
This operation is thread-safe, unlike imageImageWioInput
.
If you are sure that image
is not shared with another thread (perhaps you
have made it yourself), use imageImageWioInput
instead.
See also: imageImageWioInput
.
imageDecode
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m (Int32, Image) | Returns: 0 on success, or -1 on error. |
A convenience function to unpack to a format that we can compute with.
out
.coding is always VIPS_CODING_NONE
.
This unpacks LABQ to plain LAB. Use vips_LabQ2LabS()
for a bit more speed
if you need it.
See also: imageImageEncode
, vips_LabQ2Lab()
, vips_rad2float()
.
imageDecodePredict
imageImageDecodePredict Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m (Int32, Int32, BandFormat) |
We often need to know what an image will decode to without actually decoding it, for example, in arg checking.
See also: imageImageDecode
.
imageEncode
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Coding |
|
-> m (Int32, Image) | Returns: 0 on success, or -1 on error. |
A convenience function to pack to a coding. The inverse of
imageImageDecode
.
See also: imageImageDecode
.
imageGet
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> m GValue |
Fill valueCopy
with a copy of the header field. valueCopy
must be zeroed
but uninitialised.
This will return -1 and add a message to the error buffer if the field
does not exist. Use imageImageGetTypeof
to test for the
existence of a field first if you are not certain it will be there.
For example, to read a double from an image (though of course you would use
imageImageGetDouble
in practice):
GValue value = { 0 }; double d; if (vips_image_get (image, name, &value)) return -1; if (G_VALUE_TYPE (&value) != G_TYPE_DOUBLE) { vips_error( "mydomain", _("field \"%s\" is of type %s, not double"), name, g_type_name (G_VALUE_TYPE (&value))); g_value_unset (&value); return -1; } d = g_value_get_double (&value); g_value_unset (&value);
See also: imageImageGetTypeof
, imageImageGetDouble
.
imageGetArea
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> m (Int32, Ptr ()) | Returns: 0 on success, -1 otherwise. |
Gets data
from image
under the name name
. A convenience
function over imageImageGet
. Use imageImageGetTypeof
to test for
the existence of a piece of metadata.
See also: imageImageSetArea
, imageImageGet
,
imageImageGetTypeof
imageGetArrayInt
imageImageGetArrayInt Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> Int32 |
|
-> m Int32 | Returns: 0 on success, -1 otherwise. |
Gets out
from im
under the name name
.
The field must be of type
VIPS_TYPE_ARRAY_INT
.
Do not free out
. out
is valid as long as image
is valid.
Use imageImageGetTypeof
to test for the
existence of a piece of metadata.
See also: imageImageGet
, imageImageSetImage
imageGetAsString
imageImageGetAsString Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m Int32 | Returns: 0 on success, -1 otherwise. |
Returns name
from image
in out
.
This function will read any field, returning it as a printable string.
You need to free the string with free
when you are done with it.
This will base64-encode BLOBs, for example. Use vips_buf_appendgv()
to
make a string that's for humans.
See also: imageImageGet
, imageImageGetTypeof
, vips_buf_appendgv()
.
imageGetBands
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the number of bands (channels) in the image. |
No description available in the introspection data.
imageGetBlob
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Ptr () |
|
-> Word64 |
|
-> m Int32 | Returns: 0 on success, -1 otherwise. |
Gets blob
from image
under the name name
, optionally returns its length in
length
. A convenience
function over imageImageGet
. Use imageImageGetTypeof
to test for the
existence
of a piece of metadata.
See also: imageImageGet
, imageImageGetTypeof
, blobGet
,
imageGetCoding
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Coding | Returns: the image coding |
No description available in the introspection data.
imageGetData
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m (Ptr ()) | Returns: a pointer to pixel data, if possible. |
Return a pointer to the image's pixel data, if possible. This can involve allocating large amounts of memory and performing a long computation. Image pixels are laid out in band-packed rows.
Since this function modifies image
, it is not threadsafe. Only call it on
images which you are sure have not been shared with another thread.
See also: imageImageWioInput
, imageImageCopyMemory
.
imageGetDouble
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> m Int32 | Returns: 0 on success, -1 otherwise. |
Gets out
from im
under the name name
.
The value will be transformed into
a double, if possible.
See also: imageImageGet
, imageImageGetTypeof
imageGetFields
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m [Text] | Returns: metadata fields in image, as a |
Get a Nothing
-terminated array listing all the metadata field names on image
.
Free the return result with strfreev
.
This is handy for language bindings. From C, it's usually more convenient to
use imageImageMap
.
imageGetFilename
imageImageGetFilename Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Text | Returns: the name of the file the image was loaded from, or NULL if there is no filename. |
No description available in the introspection data.
imageGetFormat
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m BandFormat | Returns: the format of each band element. |
No description available in the introspection data.
imageGetHeight
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the number of pixels down the image. |
No description available in the introspection data.
imageGetHistory
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Text | Returns: The history of |
This function reads the image history as a C string. The string is owned by VIPS and must not be freed.
VIPS tracks the history of each image, that is, the sequence of operations
that generated that image. Applications built on VIPS need to call
vips_image_history_printf()
for each action they perform, setting the
command-line equivalent for the action.
See also: vips_image_history_printf()
.
imageGetImage
:: (HasCallStack, MonadIO m, IsImage a, IsImage b) | |
=> a |
|
-> Text |
|
-> b |
|
-> m Int32 | Returns: 0 on success, -1 otherwise. |
Gets out
from im
under the name name
.
The field must be of type
VIPS_TYPE_IMAGE
. You must unref out
with objectUnref
.
Use imageImageGetTypeof
to test for the
existence of a piece of metadata.
See also: imageImageGet
, imageImageSetImage
imageGetInt
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> m (Int32, Int32) | Returns: 0 on success, -1 otherwise. |
Gets out
from im
under the name name
.
The value will be transformed into
an int, if possible.
See also: imageImageGet
, imageImageGetTypeof
imageGetInterpretation
imageImageGetInterpretation Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Interpretation | Returns: the |
Return the Interpretation
set in the image header.
Use imageImageGuessInterpretation
if you want a sanity-checked value.
imageGetMode
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Text | Returns: the image mode. |
Image modes are things like "t"
, meaning a memory buffer, and "p"
meaning a delayed computation.
imageGetNPages
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the number of pages in the image file |
Fetch and sanity-check VIPS_META_N_PAGES. Default to 1 if not present or crazy.
This is the number of pages in the image file, not the number of pages that
have been loaded into image
.
imageGetOffset
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Double | Returns: the offset. |
Matrix images can have an optional offset
field for use by integer
convolution.
imageGetPageHeight
imageImageGetPageHeight Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the page height. |
Multi-page images can have a page height. Fetch it, and sanity check it. If page-height is not set, it defaults to the image height.
imageGetScale
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Double | Returns: the scale. |
Matrix images can have an optional scale
field for use by integer
convolution.
imageGetString
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m Int32 | Returns: 0 on success, -1 otherwise. |
Gets out
from im
under the name name
.
The field must be of type
G_STRING, VIPS_TYPE_REFSTRING.
Do not free out
.
Use imageImageGetAsString
to fetch any field as a string.
See also: imageImageGet
, imageImageGetTypeof
imageGetTypeof
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> m GType | Returns: the |
Read the GType
for a header field. Returns zero if there is no
field of that name.
See also: imageImageGet
.
imageGetWidth
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the number of pixels across the image. |
No description available in the introspection data.
imageGetXoffset
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the horizontal position of the image origin, in pixels. |
No description available in the introspection data.
imageGetXres
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Double | Returns: the horizontal image resolution in pixels per millimeter. |
No description available in the introspection data.
imageGetYoffset
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the vertical position of the image origin, in pixels. |
No description available in the introspection data.
imageGetYres
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Double | Returns: the vertical image resolution in pixels per millimeter. |
No description available in the introspection data.
imageGuessFormat
imageImageGuessFormat Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m BandFormat | Returns: a sensible |
Return the BandFormat
for an image, guessing a sane value if
the set value looks crazy.
For example, for a float image tagged as rgb16, we'd return ushort.
imageGuessInterpretation
imageImageGuessInterpretation Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Interpretation | Returns: a sensible |
Return the Interpretation
for an image, guessing a sane value if
the set value looks crazy.
imageHasalpha
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Bool |
Look at an image's interpretation and see if it has extra alpha bands. For
example, a 4-band VIPS_INTERPRETATION_sRGB
would, but a six-band
VIPS_INTERPRETATION_MULTIBAND
would not.
Return True
if image
has an alpha channel.
imageHistoryArgs
imageImageHistoryArgs Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> [Text] |
|
-> m Int32 | Returns: 0 on success, -1 on error. |
Formats the name/argv as a single string and calls
vips_image_history_printf()
. A
convenience function for command-line prorams.
See also: imageImageGetHistory
.
imageInitFields
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> BandFormat |
|
-> Coding |
|
-> Interpretation |
|
-> Double |
|
-> Double |
|
-> m () |
A convenience function to set the header fields after creating an image.
Normally you copy the fields from your input images with
vips_image_pipelinev()
and then make
any adjustments you need, but if you are creating an image from scratch,
for example vips_black()
or vips_jpegload()
, you do need to set all the
fields yourself.
See also: vips_image_pipelinev()
.
imageInplace
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: 0 on succeess, or -1 on error. |
Gets image
ready for an in-place operation, such as vips_draw_circle()
.
After calling this function you can both read and write the image with
VIPS_IMAGE_ADDR()
.
Since this function modifies image
, it is not thread-safe. Only call it on
images which you are sure have not been shared with another thread.
All in-place operations are inherently not thread-safe, so you need to take
great care in any case.
See also: vips_draw_circle()
, imageImageWioInput
.
imageInvalidateAll
imageImageInvalidateAll Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m () |
Invalidate all pixel caches on image
and any downstream images, that
is, images which depend on this image. Additionally, all operations which
depend upon this image are dropped from the VIPS operation cache.
You should call this function after
destructively modifying an image with something like vips_draw_circle()
.
The invalidate signal is emitted for all invalidated images.
See also: regionRegionInvalidate
.
imageIsMSBfirst
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Bool |
Return True
if image
is in most-significant-
byte first form. This is the byte order used on the SPARC
architecture and others.
imageIsSequential
imageImageIsSequential Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Bool | Returns: |
TRUE if any of the images upstream from image
were opened in sequential
mode. Some operations change behaviour slightly in sequential mode to
optimize memory behaviour.
imageIsfile
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Bool |
Return True
if image
represents a file on disc in some way.
imageIskilled
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Bool | Returns: |
If image
has been killed (see imageImageSetKill
), set an error message,
clear the Image
.kill
flag and return True
. Otherwise return False
.
Handy for loops which need to run sets of threads which can fail.
See also: imageImageSetKill
.
imageIspartial
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Bool |
Return True
if im
represents a partial image (a delayed calculation).
imageMinimiseAll
imageImageMinimiseAll Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m () |
Minimise memory use on this image and any upstream images, that is, images which this image depends upon. This function is called automatically at the end of a computation, but it might be useful to call at other times.
The minimise signal is emitted for all minimised images.
imagePioInput
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: 0 on succeess, or -1 on error. |
Check that an image is readable with regionRegionPrepare
and friends.
If it isn't, try to transform the image so that regionRegionPrepare
can
work.
See also: imageImagePioOutput
, regionRegionPrepare
.
imagePioOutput
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: 0 on succeess, or -1 on error. |
Check that an image is writeable with vips_image_generate()
. If it isn't,
try to transform the image so that vips_image_generate()
can work.
See also: imageImagePioInput
.
imagePrintField
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text | |
-> m () |
Prints field name
to stdout as ASCII. Handy for debugging.
imageRemove
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Find and remove an item of metadata. Return False
if no metadata of that
name was found.
See also: imageImageSet
, imageImageGetTypeof
.
imageSet
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> GValue |
|
-> m () |
Set a piece of metadata on image
. Any old metadata with that name is
destroyed. The GValue
is copied into the image, so you need to unset the
value when you're done with it.
For example, to set an integer on an image (though you would use the
convenience function imageImageSetInt
in practice), you would do:
GValue value = { 0 }; g_value_init (&value, G_TYPE_INT); g_value_set_int (&value, 42); vips_image_set (image, name, &value); g_value_unset (&value);
See also: imageImageGet
.
imageSetArea
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> CallbackFn |
|
-> m () |
Attaches data
as a metadata item on image
under the name name
. When
VIPS no longer needs the metadata, it will be freed with freeFn
.
See also: imageImageGetDouble
, imageImageSet
imageSetArrayInt
imageImageSetArrayInt Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Maybe [Int32] |
|
-> m () |
Attaches array
as a metadata item on image
as name
.
A convenience function over imageImageSet
.
See also: imageImageGetImage
, imageImageSet
.
imageSetBlob
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> CallbackFn |
|
-> Word64 |
|
-> m () |
Attaches blob
as a metadata item on image
under the name name
. A
convenience
function over imageImageSet
using a vips_blob.
See also: imageImageGetBlob
, imageImageSet
.
imageSetBlobCopy
imageImageSetBlobCopy Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Ptr () |
|
-> Word64 |
|
-> m () |
Attaches blob
as a metadata item on image
under the name name
, taking
a copy of the memory area. A convenience function over
imageImageSetBlob
.
See also: imageImageGetBlob
, imageImageSet
.
imageSetDeleteOnClose
imageImageSetDeleteOnClose Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the delete_on_close flag for the image. If this flag is set, when
image
is finalized, the filename held in image
->filename at the time of
this call is deleted.
This function is clearly extremely dangerous, use with great caution.
See also: imageNewTempFile
.
imageSetDouble
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> m () |
Attaches d
as a metadata item on image
as name
. A
convenience
function over imageImageSet
.
See also: imageImageGetDouble
, imageImageSet
imageSetImage
:: (HasCallStack, MonadIO m, IsImage a, IsImage b) | |
=> a |
|
-> Text |
|
-> b |
|
-> m () |
Attaches im
as a metadata item on image
as name
.
A convenience function over imageImageSet
.
See also: imageImageGetImage
, imageImageSet
.
imageSetInt
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m () |
Attaches i
as a metadata item on image
under the name name
. A
convenience
function over imageImageSet
.
See also: imageImageGetInt
, imageImageSet
imageSetKill
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Bool |
|
-> m () |
Set the Image
.kill
flag on an image. Handy for stopping sets of
threads.
See also: imageImageIskilled
.
imageSetProgress
imageImageSetProgress Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Bool |
|
-> m () |
vips signals evaluation progress via the preeval,
eval and posteval
signals. Progress is signalled on the most-downstream image for which
imageImageSetProgress
was called.
imageSetString
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m () |
Attaches str
as a metadata item on image
as name
.
A convenience
function over imageImageSet
using VIPS_TYPE_REF_STRING
.
See also: imageImageGetDouble
, imageImageSet
.
imageWioInput
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: 0 on succeess, or -1 on error. |
Check that an image is readable via the VIPS_IMAGE_ADDR()
macro, that is,
that the entire image is in memory and all pixels can be read with
VIPS_IMAGE_ADDR()
. If it
isn't, try to transform it so that VIPS_IMAGE_ADDR()
can work.
Since this function modifies image
, it is not thread-safe. Only call it on
images which you are sure have not been shared with another thread. If the
image might have been shared, use the less efficient
imageImageCopyMemory
instead.
See also: imageImageCopyMemory
, imageImagePioInput
,
imageImageInplace
, VIPS_IMAGE_ADDR()
.
imageWrite
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m (Int32, Image) | Returns: 0 on success, or -1 on error. |
imageWriteLine
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Int32 |
|
-> Word8 |
|
-> m Int32 | Returns: 0 on success, or -1 on error. |
Write a line of pixels to an image. This function must be called repeatedly
with ypos
increasing from 0 to Image
::height
.
linebuffer
must be VIPS_IMAGE_SIZEOF_LINE()
bytes long.
See also: vips_image_generate()
.
imageWritePrepare
imageImageWritePrepare Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: 0 on success, or -1 on error. |
Call this after setting header fields (width, height, and so on) to allocate resources ready for writing.
Normally this function is called for you by vips_image_generate()
or
imageImageWriteLine
. You will need to call it yourself if you plan to
write directly to the ->data member of a memory image.
imageWriteToMemory
imageImageWriteToMemory Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m ByteString | Returns: return buffer start here |
Writes in
to memory as a simple, unformatted C-style array.
The caller is responsible for freeing this memory with free
.
See also: vips_image_write_to_buffer()
.
matrixFromArray
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Int32 |
|
-> [Double] |
|
-> m Image |
A renamed imageNewMatrixFromArray
. Some gobject bindings do not
like more than one _new method.
memory
:: (HasCallStack, MonadIO m) | |
=> m Image |
A renamed imageNewMemory
... Some gobject binding systems do not
like more than one _new()
method.
See also: imageNewMemory
.
new
:: (HasCallStack, MonadIO m) | |
=> m Image |
imageNew
creates a new, empty Image
.
If you write to one of these images, vips will just attach some callbacks,
no pixels will be generated.
Write pixels to an image with vips_image_generate()
or
imageImageWriteLine
. Write a whole image to another image with
imageImageWrite
.
newFromFileRW
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Image |
Opens the named file for simultaneous reading and writing. This will only work for VIPS files in a format native to your machine. It is only for paintbox-type applications.
See also: vips_draw_circle()
.
newFromFileRaw
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Word64 |
|
-> m Image |
This function maps the named file and returns a Image
you can use to
read it.
It returns an 8-bit image with bands
bands. If the image is not 8-bit, use
vips_copy()
to transform the descriptor after loading it.
See also: vips_copy()
, vips_rawload()
, vips_image_new_from_file()
.
newFromImage
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> [Double] |
|
-> m Image |
Creates a new image with width, height, format, interpretation, resolution
and offset taken from image
, but with number of bands taken from n
and the
value of each band element set from c
.
See also: imageNewFromImage1
newFromImage1
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Double |
|
-> m Image |
Creates a new image with width, height, format, interpretation, resolution
and offset taken from image
, but with one band and each pixel having the
value c
.
See also: imageNewFromImage
newFromMemory
:: (HasCallStack, MonadIO m) | |
=> ByteString |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> BandFormat |
|
-> m Image |
This function wraps a Image
around a memory area. The memory area
must be a simple array, for example RGBRGBRGB, left-to-right,
top-to-bottom. Use vips_image_new_from_buffer()
to load an area of memory
containing an image in a format.
VIPS does not take responsibility for the area of memory, it's up to you to make sure it's freed when the image is closed. See for example close.
Because VIPS is "borrowing" data
from the caller, this function is
extremely dangerous. Unless you are very careful, you will get crashes or
memory corruption. Use imageNewFromMemoryCopy
instead if you are
at all unsure.
Use vips_copy()
to set other image properties.
See also: imageNew
, imageImageWriteToMemory
,
imageNewFromMemoryCopy
.
newFromMemoryCopy
imageNewFromMemoryCopy Source #
:: (HasCallStack, MonadIO m) | |
=> ByteString |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> BandFormat |
|
-> m Image |
Like imageNewFromMemory
, but VIPS will make a copy of the memory
area. This means more memory use and an extra copy operation, but is much
simpler and safer.
See also: imageNewFromMemory
.
newMatrix
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Int32 |
|
-> m Image |
This convenience function makes an image which is a matrix: a one-band
VIPS_FORMAT_DOUBLE
image held in memory.
Use VIPS_IMAGE_ADDR()
, or VIPS_MATRIX()
to address pixels in the image.
Use imageImageSetDouble
to set "scale" and "offset", if required.
See also: vips_image_new_matrixv()
newMatrixFromArray
imageNewMatrixFromArray Source #
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Int32 |
|
-> [Double] |
|
-> m Image |
A binding-friendly version of vips_image_new_matrixv()
.
newMemory
:: (HasCallStack, MonadIO m) | |
=> m Image |
imageNewMemory
creates a new Image
which, when written to, will
create a memory image.
See also: imageNew
.
newTempFile
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Image |
Make a Image
which, when written to, will create a temporary file on
disc. The file will be automatically deleted when the image is destroyed.
format
is something like "%s.v" for a vips file.
The file is created in the temporary directory. This is set with the
environment variable TMPDIR. If this is not set, then on Unix systems, vips
will default to /tmp. On Windows, vips uses GetTempPath()
to find the
temporary directory.
See also: imageNew
.
reorderMarginHint
imageReorderMarginHint Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Int32 |
|
-> m () |
imageReorderMarginHint
sets a hint that image
contains a margin, that
is, that each regionRegionPrepare
on image
will request a slightly larger
region from it's inputs. A good value for margin
is (width * height) for
the window the operation uses.
This information is used by vips_image_prepare_many()
to attempt to reorder
computations to minimise recomputation.
See also: vips_image_prepare_many()
.
reorderPrepareMany
imageReorderPrepareMany Source #
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> [Region] |
|
-> Rect |
|
-> m Int32 | Returns: 0 on success, or -1 on error. |
imageReorderPrepareMany
runs regionRegionPrepare
on each region in
regions
, requesting the pixels in r
.
It tries to request the regions in the order which will cause least recomputation. This can give a large speedup, in some cases.
See also: regionRegionPrepare
, imageReorderMarginHint
.
Properties
bands
No description available in the introspection data.
constructImageBands :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “bands
” property. This is rarely needed directly, but it is used by new
.
getImageBands :: (MonadIO m, IsImage o) => o -> m Int32 Source #
Get the value of the “bands
” property.
When overloading is enabled, this is equivalent to
get
image #bands
setImageBands :: (MonadIO m, IsImage o) => o -> Int32 -> m () Source #
Set the value of the “bands
” property.
When overloading is enabled, this is equivalent to
set
image [ #bands:=
value ]
coding
No description available in the introspection data.
constructImageCoding :: (IsImage o, MonadIO m) => Coding -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “coding
” property. This is rarely needed directly, but it is used by new
.
getImageCoding :: (MonadIO m, IsImage o) => o -> m Coding Source #
Get the value of the “coding
” property.
When overloading is enabled, this is equivalent to
get
image #coding
setImageCoding :: (MonadIO m, IsImage o) => o -> Coding -> m () Source #
Set the value of the “coding
” property.
When overloading is enabled, this is equivalent to
set
image [ #coding:=
value ]
demand
No description available in the introspection data.
constructImageDemand :: (IsImage o, MonadIO m) => DemandStyle -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “demand
” property. This is rarely needed directly, but it is used by new
.
getImageDemand :: (MonadIO m, IsImage o) => o -> m DemandStyle Source #
Get the value of the “demand
” property.
When overloading is enabled, this is equivalent to
get
image #demand
setImageDemand :: (MonadIO m, IsImage o) => o -> DemandStyle -> m () Source #
Set the value of the “demand
” property.
When overloading is enabled, this is equivalent to
set
image [ #demand:=
value ]
filename
No description available in the introspection data.
clearImageFilename :: (MonadIO m, IsImage o) => o -> m () Source #
Set the value of the “filename
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#filename
constructImageFilename :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “filename
” property. This is rarely needed directly, but it is used by new
.
getImageFilename :: (MonadIO m, IsImage o) => o -> m (Maybe Text) Source #
Get the value of the “filename
” property.
When overloading is enabled, this is equivalent to
get
image #filename
setImageFilename :: (MonadIO m, IsImage o) => o -> Text -> m () Source #
Set the value of the “filename
” property.
When overloading is enabled, this is equivalent to
set
image [ #filename:=
value ]
foreignBuffer
No description available in the introspection data.
constructImageForeignBuffer :: (IsImage o, MonadIO m) => Ptr () -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “foreign-buffer
” property. This is rarely needed directly, but it is used by new
.
getImageForeignBuffer :: (MonadIO m, IsImage o) => o -> m (Ptr ()) Source #
Get the value of the “foreign-buffer
” property.
When overloading is enabled, this is equivalent to
get
image #foreignBuffer
setImageForeignBuffer :: (MonadIO m, IsImage o) => o -> Ptr () -> m () Source #
Set the value of the “foreign-buffer
” property.
When overloading is enabled, this is equivalent to
set
image [ #foreignBuffer:=
value ]
format
No description available in the introspection data.
constructImageFormat :: (IsImage o, MonadIO m) => BandFormat -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “format
” property. This is rarely needed directly, but it is used by new
.
getImageFormat :: (MonadIO m, IsImage o) => o -> m BandFormat Source #
Get the value of the “format
” property.
When overloading is enabled, this is equivalent to
get
image #format
setImageFormat :: (MonadIO m, IsImage o) => o -> BandFormat -> m () Source #
Set the value of the “format
” property.
When overloading is enabled, this is equivalent to
set
image [ #format:=
value ]
height
No description available in the introspection data.
constructImageHeight :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “height
” property. This is rarely needed directly, but it is used by new
.
getImageHeight :: (MonadIO m, IsImage o) => o -> m Int32 Source #
Get the value of the “height
” property.
When overloading is enabled, this is equivalent to
get
image #height
setImageHeight :: (MonadIO m, IsImage o) => o -> Int32 -> m () Source #
Set the value of the “height
” property.
When overloading is enabled, this is equivalent to
set
image [ #height:=
value ]
interpretation
No description available in the introspection data.
constructImageInterpretation :: (IsImage o, MonadIO m) => Interpretation -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “interpretation
” property. This is rarely needed directly, but it is used by new
.
getImageInterpretation :: (MonadIO m, IsImage o) => o -> m Interpretation Source #
Get the value of the “interpretation
” property.
When overloading is enabled, this is equivalent to
get
image #interpretation
setImageInterpretation :: (MonadIO m, IsImage o) => o -> Interpretation -> m () Source #
Set the value of the “interpretation
” property.
When overloading is enabled, this is equivalent to
set
image [ #interpretation:=
value ]
kill
No description available in the introspection data.
constructImageKill :: (IsImage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “kill
” property. This is rarely needed directly, but it is used by new
.
getImageKill :: (MonadIO m, IsImage o) => o -> m Bool Source #
Get the value of the “kill
” property.
When overloading is enabled, this is equivalent to
get
image #kill
setImageKill :: (MonadIO m, IsImage o) => o -> Bool -> m () Source #
Set the value of the “kill
” property.
When overloading is enabled, this is equivalent to
set
image [ #kill:=
value ]
mode
No description available in the introspection data.
clearImageMode :: (MonadIO m, IsImage o) => o -> m () Source #
Set the value of the “mode
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#mode
constructImageMode :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “mode
” property. This is rarely needed directly, but it is used by new
.
getImageMode :: (MonadIO m, IsImage o) => o -> m (Maybe Text) Source #
Get the value of the “mode
” property.
When overloading is enabled, this is equivalent to
get
image #mode
setImageMode :: (MonadIO m, IsImage o) => o -> Text -> m () Source #
Set the value of the “mode
” property.
When overloading is enabled, this is equivalent to
set
image [ #mode:=
value ]
sizeofHeader
No description available in the introspection data.
constructImageSizeofHeader :: (IsImage o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “sizeof-header
” property. This is rarely needed directly, but it is used by new
.
getImageSizeofHeader :: (MonadIO m, IsImage o) => o -> m Word64 Source #
Get the value of the “sizeof-header
” property.
When overloading is enabled, this is equivalent to
get
image #sizeofHeader
setImageSizeofHeader :: (MonadIO m, IsImage o) => o -> Word64 -> m () Source #
Set the value of the “sizeof-header
” property.
When overloading is enabled, this is equivalent to
set
image [ #sizeofHeader:=
value ]
width
No description available in the introspection data.
constructImageWidth :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “width
” property. This is rarely needed directly, but it is used by new
.
getImageWidth :: (MonadIO m, IsImage o) => o -> m Int32 Source #
Get the value of the “width
” property.
When overloading is enabled, this is equivalent to
get
image #width
setImageWidth :: (MonadIO m, IsImage o) => o -> Int32 -> m () Source #
Set the value of the “width
” property.
When overloading is enabled, this is equivalent to
set
image [ #width:=
value ]
xoffset
No description available in the introspection data.
constructImageXoffset :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “xoffset
” property. This is rarely needed directly, but it is used by new
.
getImageXoffset :: (MonadIO m, IsImage o) => o -> m Int32 Source #
Get the value of the “xoffset
” property.
When overloading is enabled, this is equivalent to
get
image #xoffset
setImageXoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m () Source #
Set the value of the “xoffset
” property.
When overloading is enabled, this is equivalent to
set
image [ #xoffset:=
value ]
xres
No description available in the introspection data.
constructImageXres :: (IsImage o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “xres
” property. This is rarely needed directly, but it is used by new
.
getImageXres :: (MonadIO m, IsImage o) => o -> m Double Source #
Get the value of the “xres
” property.
When overloading is enabled, this is equivalent to
get
image #xres
setImageXres :: (MonadIO m, IsImage o) => o -> Double -> m () Source #
Set the value of the “xres
” property.
When overloading is enabled, this is equivalent to
set
image [ #xres:=
value ]
yoffset
No description available in the introspection data.
constructImageYoffset :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “yoffset
” property. This is rarely needed directly, but it is used by new
.
getImageYoffset :: (MonadIO m, IsImage o) => o -> m Int32 Source #
Get the value of the “yoffset
” property.
When overloading is enabled, this is equivalent to
get
image #yoffset
setImageYoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m () Source #
Set the value of the “yoffset
” property.
When overloading is enabled, this is equivalent to
set
image [ #yoffset:=
value ]
yres
No description available in the introspection data.
constructImageYres :: (IsImage o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “yres
” property. This is rarely needed directly, but it is used by new
.
getImageYres :: (MonadIO m, IsImage o) => o -> m Double Source #
Get the value of the “yres
” property.
When overloading is enabled, this is equivalent to
get
image #yres
setImageYres :: (MonadIO m, IsImage o) => o -> Double -> m () Source #
Set the value of the “yres
” property.
When overloading is enabled, this is equivalent to
set
image [ #yres:=
value ]
Signals
eval
type C_ImageEvalCallback = Ptr () -> Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ImageEvalCallback Source #
The eval signal is emitted once per work unit (typically a 128 x 128 area of pixels) during image computation.
You can use this signal to update user-interfaces with progress feedback. Beware of updating too frequently: you will usually need some throttling mechanism.
Use imageImageSetProgress
to turn on progress reporting for an
image.
afterImageEval :: (IsImage a, MonadIO m) => a -> ImageEvalCallback -> m SignalHandlerId Source #
Connect a signal handler for the eval signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
image #eval callback
genClosure_ImageEval :: MonadIO m => ImageEvalCallback -> m (GClosure C_ImageEvalCallback) Source #
Wrap the callback into a GClosure
.
mk_ImageEvalCallback :: C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback) Source #
Generate a function pointer callable from C code, from a C_ImageEvalCallback
.
noImageEvalCallback :: Maybe ImageEvalCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ImageEvalCallback
onImageEval :: (IsImage a, MonadIO m) => a -> ImageEvalCallback -> m SignalHandlerId Source #
Connect a signal handler for the eval signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
image #eval callback
wrap_ImageEvalCallback :: ImageEvalCallback -> C_ImageEvalCallback Source #
Wrap a ImageEvalCallback
into a C_ImageEvalCallback
.
invalidate
type C_ImageInvalidateCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ImageInvalidateCallback = IO () Source #
The invalidate signal is emitted when an image or one of it's
upstream data sources has been destructively modified. See
imageImageInvalidateAll
.
afterImageInvalidate :: (IsImage a, MonadIO m) => a -> ImageInvalidateCallback -> m SignalHandlerId Source #
Connect a signal handler for the invalidate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
image #invalidate callback
genClosure_ImageInvalidate :: MonadIO m => ImageInvalidateCallback -> m (GClosure C_ImageInvalidateCallback) Source #
Wrap the callback into a GClosure
.
mk_ImageInvalidateCallback :: C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback) Source #
Generate a function pointer callable from C code, from a C_ImageInvalidateCallback
.
noImageInvalidateCallback :: Maybe ImageInvalidateCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ImageInvalidateCallback
onImageInvalidate :: (IsImage a, MonadIO m) => a -> ImageInvalidateCallback -> m SignalHandlerId Source #
Connect a signal handler for the invalidate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
image #invalidate callback
wrap_ImageInvalidateCallback :: ImageInvalidateCallback -> C_ImageInvalidateCallback Source #
Wrap a ImageInvalidateCallback
into a C_ImageInvalidateCallback
.
minimise
type C_ImageMinimiseCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ImageMinimiseCallback = IO () Source #
The minimise signal is emitted when an image has been asked to
minimise memory usage. All non-essential caches are dropped.
See
imageImageMinimiseAll
.
afterImageMinimise :: (IsImage a, MonadIO m) => a -> ImageMinimiseCallback -> m SignalHandlerId Source #
Connect a signal handler for the minimise signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
image #minimise callback
genClosure_ImageMinimise :: MonadIO m => ImageMinimiseCallback -> m (GClosure C_ImageMinimiseCallback) Source #
Wrap the callback into a GClosure
.
mk_ImageMinimiseCallback :: C_ImageMinimiseCallback -> IO (FunPtr C_ImageMinimiseCallback) Source #
Generate a function pointer callable from C code, from a C_ImageMinimiseCallback
.
noImageMinimiseCallback :: Maybe ImageMinimiseCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ImageMinimiseCallback
onImageMinimise :: (IsImage a, MonadIO m) => a -> ImageMinimiseCallback -> m SignalHandlerId Source #
Connect a signal handler for the minimise signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
image #minimise callback
wrap_ImageMinimiseCallback :: ImageMinimiseCallback -> C_ImageMinimiseCallback Source #
Wrap a ImageMinimiseCallback
into a C_ImageMinimiseCallback
.
posteval
type C_ImagePostevalCallback = Ptr () -> Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ImagePostevalCallback Source #
The posteval signal is emitted once at the end of the computation
of image
. It's a good place to shut down evaluation feedback.
Use imageImageSetProgress
to turn on progress reporting for an
image.
afterImagePosteval :: (IsImage a, MonadIO m) => a -> ImagePostevalCallback -> m SignalHandlerId Source #
Connect a signal handler for the posteval signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
image #posteval callback
genClosure_ImagePosteval :: MonadIO m => ImagePostevalCallback -> m (GClosure C_ImagePostevalCallback) Source #
Wrap the callback into a GClosure
.
mk_ImagePostevalCallback :: C_ImagePostevalCallback -> IO (FunPtr C_ImagePostevalCallback) Source #
Generate a function pointer callable from C code, from a C_ImagePostevalCallback
.
noImagePostevalCallback :: Maybe ImagePostevalCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ImagePostevalCallback
onImagePosteval :: (IsImage a, MonadIO m) => a -> ImagePostevalCallback -> m SignalHandlerId Source #
Connect a signal handler for the posteval signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
image #posteval callback
wrap_ImagePostevalCallback :: ImagePostevalCallback -> C_ImagePostevalCallback Source #
Wrap a ImagePostevalCallback
into a C_ImagePostevalCallback
.
preeval
type C_ImagePreevalCallback = Ptr () -> Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ImagePreevalCallback Source #
The preeval signal is emitted once before computation of image
starts. It's a good place to set up evaluation feedback.
Use imageImageSetProgress
to turn on progress reporting for an
image.
afterImagePreeval :: (IsImage a, MonadIO m) => a -> ImagePreevalCallback -> m SignalHandlerId Source #
Connect a signal handler for the preeval signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
image #preeval callback
genClosure_ImagePreeval :: MonadIO m => ImagePreevalCallback -> m (GClosure C_ImagePreevalCallback) Source #
Wrap the callback into a GClosure
.
mk_ImagePreevalCallback :: C_ImagePreevalCallback -> IO (FunPtr C_ImagePreevalCallback) Source #
Generate a function pointer callable from C code, from a C_ImagePreevalCallback
.
noImagePreevalCallback :: Maybe ImagePreevalCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ImagePreevalCallback
onImagePreeval :: (IsImage a, MonadIO m) => a -> ImagePreevalCallback -> m SignalHandlerId Source #
Connect a signal handler for the preeval signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
image #preeval callback
wrap_ImagePreevalCallback :: ImagePreevalCallback -> C_ImagePreevalCallback Source #
Wrap a ImagePreevalCallback
into a C_ImagePreevalCallback
.
written
type C_ImageWrittenCallback = Ptr () -> Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ImageWrittenCallback Source #
The written signal is emitted just after an image has been written to. It is used by vips to implement things like write to foreign file formats.
afterImageWritten :: (IsImage a, MonadIO m) => a -> ImageWrittenCallback -> m SignalHandlerId Source #
Connect a signal handler for the written signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
image #written callback
genClosure_ImageWritten :: MonadIO m => ImageWrittenCallback -> m (GClosure C_ImageWrittenCallback) Source #
Wrap the callback into a GClosure
.
mk_ImageWrittenCallback :: C_ImageWrittenCallback -> IO (FunPtr C_ImageWrittenCallback) Source #
Generate a function pointer callable from C code, from a C_ImageWrittenCallback
.
noImageWrittenCallback :: Maybe ImageWrittenCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ImageWrittenCallback
onImageWritten :: (IsImage a, MonadIO m) => a -> ImageWrittenCallback -> m SignalHandlerId Source #
Connect a signal handler for the written signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
image #written callback