{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- 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.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Vips.Objects.Image
    ( 
#if defined(ENABLE_OVERLOADING)
    ImageImageMapMethodInfo                 ,
#endif

-- * Exported types
    Image(..)                               ,
    IsImage                                 ,
    toImage                                 ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [argumentIsset]("GI.Vips.Objects.Object#g:method:argumentIsset"), [argumentNeedsstring]("GI.Vips.Objects.Object#g:method:argumentNeedsstring"), [autorotRemoveAngle]("GI.Vips.Objects.Image#g:method:autorotRemoveAngle"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [build]("GI.Vips.Objects.Object#g:method:build"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [foreignLoadInvalidate]("GI.Vips.Objects.Image#g:method:foreignLoadInvalidate"), [freeBuffer]("GI.Vips.Objects.Image#g:method:freeBuffer"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [iccAc2rc]("GI.Vips.Objects.Image#g:method:iccAc2rc"), [imageCopyMemory]("GI.Vips.Objects.Image#g:method:imageCopyMemory"), [imageDecode]("GI.Vips.Objects.Image#g:method:imageDecode"), [imageDecodePredict]("GI.Vips.Objects.Image#g:method:imageDecodePredict"), [imageEncode]("GI.Vips.Objects.Image#g:method:imageEncode"), [imageGet]("GI.Vips.Objects.Image#g:method:imageGet"), [imageGetArea]("GI.Vips.Objects.Image#g:method:imageGetArea"), [imageGetArrayDouble]("GI.Vips.Objects.Image#g:method:imageGetArrayDouble"), [imageGetArrayInt]("GI.Vips.Objects.Image#g:method:imageGetArrayInt"), [imageGetAsString]("GI.Vips.Objects.Image#g:method:imageGetAsString"), [imageGetBands]("GI.Vips.Objects.Image#g:method:imageGetBands"), [imageGetBlob]("GI.Vips.Objects.Image#g:method:imageGetBlob"), [imageGetCoding]("GI.Vips.Objects.Image#g:method:imageGetCoding"), [imageGetData]("GI.Vips.Objects.Image#g:method:imageGetData"), [imageGetDouble]("GI.Vips.Objects.Image#g:method:imageGetDouble"), [imageGetFields]("GI.Vips.Objects.Image#g:method:imageGetFields"), [imageGetFilename]("GI.Vips.Objects.Image#g:method:imageGetFilename"), [imageGetFormat]("GI.Vips.Objects.Image#g:method:imageGetFormat"), [imageGetHeight]("GI.Vips.Objects.Image#g:method:imageGetHeight"), [imageGetHistory]("GI.Vips.Objects.Image#g:method:imageGetHistory"), [imageGetImage]("GI.Vips.Objects.Image#g:method:imageGetImage"), [imageGetInt]("GI.Vips.Objects.Image#g:method:imageGetInt"), [imageGetInterpretation]("GI.Vips.Objects.Image#g:method:imageGetInterpretation"), [imageGetMode]("GI.Vips.Objects.Image#g:method:imageGetMode"), [imageGetNPages]("GI.Vips.Objects.Image#g:method:imageGetNPages"), [imageGetNSubifds]("GI.Vips.Objects.Image#g:method:imageGetNSubifds"), [imageGetOffset]("GI.Vips.Objects.Image#g:method:imageGetOffset"), [imageGetOrientation]("GI.Vips.Objects.Image#g:method:imageGetOrientation"), [imageGetOrientationSwap]("GI.Vips.Objects.Image#g:method:imageGetOrientationSwap"), [imageGetPageHeight]("GI.Vips.Objects.Image#g:method:imageGetPageHeight"), [imageGetScale]("GI.Vips.Objects.Image#g:method:imageGetScale"), [imageGetString]("GI.Vips.Objects.Image#g:method:imageGetString"), [imageGetTypeof]("GI.Vips.Objects.Image#g:method:imageGetTypeof"), [imageGetWidth]("GI.Vips.Objects.Image#g:method:imageGetWidth"), [imageGetXoffset]("GI.Vips.Objects.Image#g:method:imageGetXoffset"), [imageGetXres]("GI.Vips.Objects.Image#g:method:imageGetXres"), [imageGetYoffset]("GI.Vips.Objects.Image#g:method:imageGetYoffset"), [imageGetYres]("GI.Vips.Objects.Image#g:method:imageGetYres"), [imageGuessFormat]("GI.Vips.Objects.Image#g:method:imageGuessFormat"), [imageGuessInterpretation]("GI.Vips.Objects.Image#g:method:imageGuessInterpretation"), [imageHasalpha]("GI.Vips.Objects.Image#g:method:imageHasalpha"), [imageHistoryArgs]("GI.Vips.Objects.Image#g:method:imageHistoryArgs"), [imageInitFields]("GI.Vips.Objects.Image#g:method:imageInitFields"), [imageInplace]("GI.Vips.Objects.Image#g:method:imageInplace"), [imageInvalidateAll]("GI.Vips.Objects.Image#g:method:imageInvalidateAll"), [imageIsMSBfirst]("GI.Vips.Objects.Image#g:method:imageIsMSBfirst"), [imageIsSequential]("GI.Vips.Objects.Image#g:method:imageIsSequential"), [imageIsfile]("GI.Vips.Objects.Image#g:method:imageIsfile"), [imageIskilled]("GI.Vips.Objects.Image#g:method:imageIskilled"), [imageIspartial]("GI.Vips.Objects.Image#g:method:imageIspartial"), [imageMap]("GI.Vips.Objects.Image#g:method:imageMap"), [imageMinimiseAll]("GI.Vips.Objects.Image#g:method:imageMinimiseAll"), [imagePioInput]("GI.Vips.Objects.Image#g:method:imagePioInput"), [imagePioOutput]("GI.Vips.Objects.Image#g:method:imagePioOutput"), [imagePrintField]("GI.Vips.Objects.Image#g:method:imagePrintField"), [imageRemove]("GI.Vips.Objects.Image#g:method:imageRemove"), [imageSet]("GI.Vips.Objects.Image#g:method:imageSet"), [imageSetArea]("GI.Vips.Objects.Image#g:method:imageSetArea"), [imageSetArrayDouble]("GI.Vips.Objects.Image#g:method:imageSetArrayDouble"), [imageSetArrayInt]("GI.Vips.Objects.Image#g:method:imageSetArrayInt"), [imageSetBlob]("GI.Vips.Objects.Image#g:method:imageSetBlob"), [imageSetBlobCopy]("GI.Vips.Objects.Image#g:method:imageSetBlobCopy"), [imageSetDeleteOnClose]("GI.Vips.Objects.Image#g:method:imageSetDeleteOnClose"), [imageSetDouble]("GI.Vips.Objects.Image#g:method:imageSetDouble"), [imageSetImage]("GI.Vips.Objects.Image#g:method:imageSetImage"), [imageSetInt]("GI.Vips.Objects.Image#g:method:imageSetInt"), [imageSetKill]("GI.Vips.Objects.Image#g:method:imageSetKill"), [imageSetProgress]("GI.Vips.Objects.Image#g:method:imageSetProgress"), [imageSetString]("GI.Vips.Objects.Image#g:method:imageSetString"), [imageWioInput]("GI.Vips.Objects.Image#g:method:imageWioInput"), [imageWrite]("GI.Vips.Objects.Image#g:method:imageWrite"), [imageWriteLine]("GI.Vips.Objects.Image#g:method:imageWriteLine"), [imageWritePrepare]("GI.Vips.Objects.Image#g:method:imageWritePrepare"), [imageWriteToMemory]("GI.Vips.Objects.Image#g:method:imageWriteToMemory"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [localCb]("GI.Vips.Objects.Object#g:method:localCb"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [preclose]("GI.Vips.Objects.Object#g:method:preclose"), [printDump]("GI.Vips.Objects.Object#g:method:printDump"), [printName]("GI.Vips.Objects.Object#g:method:printName"), [printSummary]("GI.Vips.Objects.Object#g:method:printSummary"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [reorderMarginHint]("GI.Vips.Objects.Image#g:method:reorderMarginHint"), [reorderPrepareMany]("GI.Vips.Objects.Image#g:method:reorderPrepareMany"), [rewind]("GI.Vips.Objects.Object#g:method:rewind"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [sanity]("GI.Vips.Objects.Object#g:method:sanity"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unrefOutputs]("GI.Vips.Objects.Object#g:method:unrefOutputs"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getArgumentFlags]("GI.Vips.Objects.Object#g:method:getArgumentFlags"), [getArgumentPriority]("GI.Vips.Objects.Object#g:method:getArgumentPriority"), [getArgumentToString]("GI.Vips.Objects.Object#g:method:getArgumentToString"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDescription]("GI.Vips.Objects.Object#g:method:getDescription"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setArgumentFromString]("GI.Vips.Objects.Object#g:method:setArgumentFromString"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setFromString]("GI.Vips.Objects.Object#g:method:setFromString"), [setRequired]("GI.Vips.Objects.Object#g:method:setRequired"), [setStatic]("GI.Vips.Objects.Object#g:method:setStatic").

#if defined(ENABLE_OVERLOADING)
    ResolveImageMethod                      ,
#endif

-- ** autorotRemoveAngle #method:autorotRemoveAngle#

#if defined(ENABLE_OVERLOADING)
    ImageAutorotRemoveAngleMethodInfo       ,
#endif
    imageAutorotRemoveAngle                 ,


-- ** foreignLoadInvalidate #method:foreignLoadInvalidate#

#if defined(ENABLE_OVERLOADING)
    ImageForeignLoadInvalidateMethodInfo    ,
#endif
    imageForeignLoadInvalidate              ,


-- ** freeBuffer #method:freeBuffer#

#if defined(ENABLE_OVERLOADING)
    ImageFreeBufferMethodInfo               ,
#endif
    imageFreeBuffer                         ,


-- ** iccAc2rc #method:iccAc2rc#

#if defined(ENABLE_OVERLOADING)
    ImageIccAc2rcMethodInfo                 ,
#endif
    imageIccAc2rc                           ,


-- ** imageCopyMemory #method:imageCopyMemory#

#if defined(ENABLE_OVERLOADING)
    ImageImageCopyMemoryMethodInfo          ,
#endif
    imageImageCopyMemory                    ,


-- ** imageDecode #method:imageDecode#

#if defined(ENABLE_OVERLOADING)
    ImageImageDecodeMethodInfo              ,
#endif
    imageImageDecode                        ,


-- ** imageDecodePredict #method:imageDecodePredict#

#if defined(ENABLE_OVERLOADING)
    ImageImageDecodePredictMethodInfo       ,
#endif
    imageImageDecodePredict                 ,


-- ** imageEncode #method:imageEncode#

#if defined(ENABLE_OVERLOADING)
    ImageImageEncodeMethodInfo              ,
#endif
    imageImageEncode                        ,


-- ** imageGet #method:imageGet#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetMethodInfo                 ,
#endif
    imageImageGet                           ,


-- ** imageGetArea #method:imageGetArea#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetAreaMethodInfo             ,
#endif
    imageImageGetArea                       ,


-- ** imageGetArrayDouble #method:imageGetArrayDouble#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetArrayDoubleMethodInfo      ,
#endif
    imageImageGetArrayDouble                ,


-- ** imageGetArrayInt #method:imageGetArrayInt#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetArrayIntMethodInfo         ,
#endif
    imageImageGetArrayInt                   ,


-- ** imageGetAsString #method:imageGetAsString#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetAsStringMethodInfo         ,
#endif
    imageImageGetAsString                   ,


-- ** imageGetBands #method:imageGetBands#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetBandsMethodInfo            ,
#endif
    imageImageGetBands                      ,


-- ** imageGetBlob #method:imageGetBlob#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetBlobMethodInfo             ,
#endif
    imageImageGetBlob                       ,


-- ** imageGetCoding #method:imageGetCoding#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetCodingMethodInfo           ,
#endif
    imageImageGetCoding                     ,


-- ** imageGetData #method:imageGetData#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetDataMethodInfo             ,
#endif
    imageImageGetData                       ,


-- ** imageGetDouble #method:imageGetDouble#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetDoubleMethodInfo           ,
#endif
    imageImageGetDouble                     ,


-- ** imageGetFields #method:imageGetFields#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetFieldsMethodInfo           ,
#endif
    imageImageGetFields                     ,


-- ** imageGetFilename #method:imageGetFilename#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetFilenameMethodInfo         ,
#endif
    imageImageGetFilename                   ,


-- ** imageGetFormat #method:imageGetFormat#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetFormatMethodInfo           ,
#endif
    imageImageGetFormat                     ,


-- ** imageGetHeight #method:imageGetHeight#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetHeightMethodInfo           ,
#endif
    imageImageGetHeight                     ,


-- ** imageGetHistory #method:imageGetHistory#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetHistoryMethodInfo          ,
#endif
    imageImageGetHistory                    ,


-- ** imageGetImage #method:imageGetImage#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetImageMethodInfo            ,
#endif
    imageImageGetImage                      ,


-- ** imageGetInt #method:imageGetInt#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetIntMethodInfo              ,
#endif
    imageImageGetInt                        ,


-- ** imageGetInterpretation #method:imageGetInterpretation#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetInterpretationMethodInfo   ,
#endif
    imageImageGetInterpretation             ,


-- ** imageGetMode #method:imageGetMode#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetModeMethodInfo             ,
#endif
    imageImageGetMode                       ,


-- ** imageGetNPages #method:imageGetNPages#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetNPagesMethodInfo           ,
#endif
    imageImageGetNPages                     ,


-- ** imageGetNSubifds #method:imageGetNSubifds#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetNSubifdsMethodInfo         ,
#endif
    imageImageGetNSubifds                   ,


-- ** imageGetOffset #method:imageGetOffset#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetOffsetMethodInfo           ,
#endif
    imageImageGetOffset                     ,


-- ** imageGetOrientation #method:imageGetOrientation#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetOrientationMethodInfo      ,
#endif
    imageImageGetOrientation                ,


-- ** imageGetOrientationSwap #method:imageGetOrientationSwap#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetOrientationSwapMethodInfo  ,
#endif
    imageImageGetOrientationSwap            ,


-- ** imageGetPageHeight #method:imageGetPageHeight#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetPageHeightMethodInfo       ,
#endif
    imageImageGetPageHeight                 ,


-- ** imageGetScale #method:imageGetScale#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetScaleMethodInfo            ,
#endif
    imageImageGetScale                      ,


-- ** imageGetString #method:imageGetString#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetStringMethodInfo           ,
#endif
    imageImageGetString                     ,


-- ** imageGetTypeof #method:imageGetTypeof#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetTypeofMethodInfo           ,
#endif
    imageImageGetTypeof                     ,


-- ** imageGetWidth #method:imageGetWidth#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetWidthMethodInfo            ,
#endif
    imageImageGetWidth                      ,


-- ** imageGetXoffset #method:imageGetXoffset#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetXoffsetMethodInfo          ,
#endif
    imageImageGetXoffset                    ,


-- ** imageGetXres #method:imageGetXres#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetXresMethodInfo             ,
#endif
    imageImageGetXres                       ,


-- ** imageGetYoffset #method:imageGetYoffset#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetYoffsetMethodInfo          ,
#endif
    imageImageGetYoffset                    ,


-- ** imageGetYres #method:imageGetYres#

#if defined(ENABLE_OVERLOADING)
    ImageImageGetYresMethodInfo             ,
#endif
    imageImageGetYres                       ,


-- ** imageGuessFormat #method:imageGuessFormat#

#if defined(ENABLE_OVERLOADING)
    ImageImageGuessFormatMethodInfo         ,
#endif
    imageImageGuessFormat                   ,


-- ** imageGuessInterpretation #method:imageGuessInterpretation#

#if defined(ENABLE_OVERLOADING)
    ImageImageGuessInterpretationMethodInfo ,
#endif
    imageImageGuessInterpretation           ,


-- ** imageHasalpha #method:imageHasalpha#

#if defined(ENABLE_OVERLOADING)
    ImageImageHasalphaMethodInfo            ,
#endif
    imageImageHasalpha                      ,


-- ** imageHistoryArgs #method:imageHistoryArgs#

#if defined(ENABLE_OVERLOADING)
    ImageImageHistoryArgsMethodInfo         ,
#endif
    imageImageHistoryArgs                   ,


-- ** imageInitFields #method:imageInitFields#

#if defined(ENABLE_OVERLOADING)
    ImageImageInitFieldsMethodInfo          ,
#endif
    imageImageInitFields                    ,


-- ** imageInplace #method:imageInplace#

#if defined(ENABLE_OVERLOADING)
    ImageImageInplaceMethodInfo             ,
#endif
    imageImageInplace                       ,


-- ** imageInvalidateAll #method:imageInvalidateAll#

#if defined(ENABLE_OVERLOADING)
    ImageImageInvalidateAllMethodInfo       ,
#endif
    imageImageInvalidateAll                 ,


-- ** imageIsMSBfirst #method:imageIsMSBfirst#

#if defined(ENABLE_OVERLOADING)
    ImageImageIsMSBfirstMethodInfo          ,
#endif
    imageImageIsMSBfirst                    ,


-- ** imageIsSequential #method:imageIsSequential#

#if defined(ENABLE_OVERLOADING)
    ImageImageIsSequentialMethodInfo        ,
#endif
    imageImageIsSequential                  ,


-- ** imageIsfile #method:imageIsfile#

#if defined(ENABLE_OVERLOADING)
    ImageImageIsfileMethodInfo              ,
#endif
    imageImageIsfile                        ,


-- ** imageIskilled #method:imageIskilled#

#if defined(ENABLE_OVERLOADING)
    ImageImageIskilledMethodInfo            ,
#endif
    imageImageIskilled                      ,


-- ** imageIspartial #method:imageIspartial#

#if defined(ENABLE_OVERLOADING)
    ImageImageIspartialMethodInfo           ,
#endif
    imageImageIspartial                     ,


-- ** imageMinimiseAll #method:imageMinimiseAll#

#if defined(ENABLE_OVERLOADING)
    ImageImageMinimiseAllMethodInfo         ,
#endif
    imageImageMinimiseAll                   ,


-- ** imagePioInput #method:imagePioInput#

#if defined(ENABLE_OVERLOADING)
    ImageImagePioInputMethodInfo            ,
#endif
    imageImagePioInput                      ,


-- ** imagePioOutput #method:imagePioOutput#

#if defined(ENABLE_OVERLOADING)
    ImageImagePioOutputMethodInfo           ,
#endif
    imageImagePioOutput                     ,


-- ** imagePrintField #method:imagePrintField#

#if defined(ENABLE_OVERLOADING)
    ImageImagePrintFieldMethodInfo          ,
#endif
    imageImagePrintField                    ,


-- ** imageRemove #method:imageRemove#

#if defined(ENABLE_OVERLOADING)
    ImageImageRemoveMethodInfo              ,
#endif
    imageImageRemove                        ,


-- ** imageSet #method:imageSet#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetMethodInfo                 ,
#endif
    imageImageSet                           ,


-- ** imageSetArea #method:imageSetArea#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetAreaMethodInfo             ,
#endif
    imageImageSetArea                       ,


-- ** imageSetArrayDouble #method:imageSetArrayDouble#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetArrayDoubleMethodInfo      ,
#endif
    imageImageSetArrayDouble                ,


-- ** imageSetArrayInt #method:imageSetArrayInt#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetArrayIntMethodInfo         ,
#endif
    imageImageSetArrayInt                   ,


-- ** imageSetBlob #method:imageSetBlob#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetBlobMethodInfo             ,
#endif
    imageImageSetBlob                       ,


-- ** imageSetBlobCopy #method:imageSetBlobCopy#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetBlobCopyMethodInfo         ,
#endif
    imageImageSetBlobCopy                   ,


-- ** imageSetDeleteOnClose #method:imageSetDeleteOnClose#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetDeleteOnCloseMethodInfo    ,
#endif
    imageImageSetDeleteOnClose              ,


-- ** imageSetDouble #method:imageSetDouble#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetDoubleMethodInfo           ,
#endif
    imageImageSetDouble                     ,


-- ** imageSetImage #method:imageSetImage#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetImageMethodInfo            ,
#endif
    imageImageSetImage                      ,


-- ** imageSetInt #method:imageSetInt#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetIntMethodInfo              ,
#endif
    imageImageSetInt                        ,


-- ** imageSetKill #method:imageSetKill#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetKillMethodInfo             ,
#endif
    imageImageSetKill                       ,


-- ** imageSetProgress #method:imageSetProgress#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetProgressMethodInfo         ,
#endif
    imageImageSetProgress                   ,


-- ** imageSetString #method:imageSetString#

#if defined(ENABLE_OVERLOADING)
    ImageImageSetStringMethodInfo           ,
#endif
    imageImageSetString                     ,


-- ** imageWioInput #method:imageWioInput#

#if defined(ENABLE_OVERLOADING)
    ImageImageWioInputMethodInfo            ,
#endif
    imageImageWioInput                      ,


-- ** imageWrite #method:imageWrite#

#if defined(ENABLE_OVERLOADING)
    ImageImageWriteMethodInfo               ,
#endif
    imageImageWrite                         ,


-- ** imageWriteLine #method:imageWriteLine#

#if defined(ENABLE_OVERLOADING)
    ImageImageWriteLineMethodInfo           ,
#endif
    imageImageWriteLine                     ,


-- ** imageWritePrepare #method:imageWritePrepare#

#if defined(ENABLE_OVERLOADING)
    ImageImageWritePrepareMethodInfo        ,
#endif
    imageImageWritePrepare                  ,


-- ** imageWriteToMemory #method:imageWriteToMemory#

#if defined(ENABLE_OVERLOADING)
    ImageImageWriteToMemoryMethodInfo       ,
#endif
    imageImageWriteToMemory                 ,


-- ** matrixFromArray #method:matrixFromArray#

    imageMatrixFromArray                    ,


-- ** memory #method:memory#

    imageMemory                             ,


-- ** new #method:new#

    imageNew                                ,


-- ** newFromFileRW #method:newFromFileRW#

    imageNewFromFileRW                      ,


-- ** newFromFileRaw #method:newFromFileRaw#

    imageNewFromFileRaw                     ,


-- ** newFromImage #method:newFromImage#

    imageNewFromImage                       ,


-- ** newFromImage1 #method:newFromImage1#

    imageNewFromImage1                      ,


-- ** newFromMemory #method:newFromMemory#

    imageNewFromMemory                      ,


-- ** newFromMemoryCopy #method:newFromMemoryCopy#

    imageNewFromMemoryCopy                  ,


-- ** newMatrix #method:newMatrix#

    imageNewMatrix                          ,


-- ** newMatrixFromArray #method:newMatrixFromArray#

    imageNewMatrixFromArray                 ,


-- ** newMemory #method:newMemory#

    imageNewMemory                          ,


-- ** newTempFile #method:newTempFile#

    imageNewTempFile                        ,


-- ** reorderMarginHint #method:reorderMarginHint#

#if defined(ENABLE_OVERLOADING)
    ImageReorderMarginHintMethodInfo        ,
#endif
    imageReorderMarginHint                  ,


-- ** reorderPrepareMany #method:reorderPrepareMany#

#if defined(ENABLE_OVERLOADING)
    ImageReorderPrepareManyMethodInfo       ,
#endif
    imageReorderPrepareMany                 ,




 -- * Properties


-- ** bands #attr:bands#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageBandsPropertyInfo                  ,
#endif
    constructImageBands                     ,
    getImageBands                           ,
#if defined(ENABLE_OVERLOADING)
    imageBands                              ,
#endif
    setImageBands                           ,


-- ** coding #attr:coding#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageCodingPropertyInfo                 ,
#endif
    constructImageCoding                    ,
    getImageCoding                          ,
#if defined(ENABLE_OVERLOADING)
    imageCoding                             ,
#endif
    setImageCoding                          ,


-- ** demand #attr:demand#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageDemandPropertyInfo                 ,
#endif
    constructImageDemand                    ,
    getImageDemand                          ,
#if defined(ENABLE_OVERLOADING)
    imageDemand                             ,
#endif
    setImageDemand                          ,


-- ** filename #attr:filename#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageFilenamePropertyInfo               ,
#endif
    clearImageFilename                      ,
    constructImageFilename                  ,
    getImageFilename                        ,
#if defined(ENABLE_OVERLOADING)
    imageFilename                           ,
#endif
    setImageFilename                        ,


-- ** foreignBuffer #attr:foreignBuffer#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageForeignBufferPropertyInfo          ,
#endif
    constructImageForeignBuffer             ,
    getImageForeignBuffer                   ,
#if defined(ENABLE_OVERLOADING)
    imageForeignBuffer                      ,
#endif
    setImageForeignBuffer                   ,


-- ** format #attr:format#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageFormatPropertyInfo                 ,
#endif
    constructImageFormat                    ,
    getImageFormat                          ,
#if defined(ENABLE_OVERLOADING)
    imageFormat                             ,
#endif
    setImageFormat                          ,


-- ** height #attr:height#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageHeightPropertyInfo                 ,
#endif
    constructImageHeight                    ,
    getImageHeight                          ,
#if defined(ENABLE_OVERLOADING)
    imageHeight                             ,
#endif
    setImageHeight                          ,


-- ** interpretation #attr:interpretation#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageInterpretationPropertyInfo         ,
#endif
    constructImageInterpretation            ,
    getImageInterpretation                  ,
#if defined(ENABLE_OVERLOADING)
    imageInterpretation                     ,
#endif
    setImageInterpretation                  ,


-- ** kill #attr:kill#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageKillPropertyInfo                   ,
#endif
    constructImageKill                      ,
    getImageKill                            ,
#if defined(ENABLE_OVERLOADING)
    imageKill                               ,
#endif
    setImageKill                            ,


-- ** mode #attr:mode#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageModePropertyInfo                   ,
#endif
    clearImageMode                          ,
    constructImageMode                      ,
    getImageMode                            ,
#if defined(ENABLE_OVERLOADING)
    imageMode                               ,
#endif
    setImageMode                            ,


-- ** sizeofHeader #attr:sizeofHeader#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageSizeofHeaderPropertyInfo           ,
#endif
    constructImageSizeofHeader              ,
    getImageSizeofHeader                    ,
#if defined(ENABLE_OVERLOADING)
    imageSizeofHeader                       ,
#endif
    setImageSizeofHeader                    ,


-- ** width #attr:width#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageWidthPropertyInfo                  ,
#endif
    constructImageWidth                     ,
    getImageWidth                           ,
#if defined(ENABLE_OVERLOADING)
    imageWidth                              ,
#endif
    setImageWidth                           ,


-- ** xoffset #attr:xoffset#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageXoffsetPropertyInfo                ,
#endif
    constructImageXoffset                   ,
    getImageXoffset                         ,
#if defined(ENABLE_OVERLOADING)
    imageXoffset                            ,
#endif
    setImageXoffset                         ,


-- ** xres #attr:xres#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageXresPropertyInfo                   ,
#endif
    constructImageXres                      ,
    getImageXres                            ,
#if defined(ENABLE_OVERLOADING)
    imageXres                               ,
#endif
    setImageXres                            ,


-- ** yoffset #attr:yoffset#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageYoffsetPropertyInfo                ,
#endif
    constructImageYoffset                   ,
    getImageYoffset                         ,
#if defined(ENABLE_OVERLOADING)
    imageYoffset                            ,
#endif
    setImageYoffset                         ,


-- ** yres #attr:yres#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ImageYresPropertyInfo                   ,
#endif
    constructImageYres                      ,
    getImageYres                            ,
#if defined(ENABLE_OVERLOADING)
    imageYres                               ,
#endif
    setImageYres                            ,




 -- * Signals


-- ** eval #signal:eval#

    ImageEvalCallback                       ,
#if defined(ENABLE_OVERLOADING)
    ImageEvalSignalInfo                     ,
#endif
    afterImageEval                          ,
    onImageEval                             ,


-- ** invalidate #signal:invalidate#

    ImageInvalidateCallback                 ,
#if defined(ENABLE_OVERLOADING)
    ImageInvalidateSignalInfo               ,
#endif
    afterImageInvalidate                    ,
    onImageInvalidate                       ,


-- ** minimise #signal:minimise#

    ImageMinimiseCallback                   ,
#if defined(ENABLE_OVERLOADING)
    ImageMinimiseSignalInfo                 ,
#endif
    afterImageMinimise                      ,
    onImageMinimise                         ,


-- ** posteval #signal:posteval#

    ImagePostevalCallback                   ,
#if defined(ENABLE_OVERLOADING)
    ImagePostevalSignalInfo                 ,
#endif
    afterImagePosteval                      ,
    onImagePosteval                         ,


-- ** preeval #signal:preeval#

    ImagePreevalCallback                    ,
#if defined(ENABLE_OVERLOADING)
    ImagePreevalSignalInfo                  ,
#endif
    afterImagePreeval                       ,
    onImagePreeval                          ,


-- ** written #signal:written#

    ImageWrittenCallback                    ,
#if defined(ENABLE_OVERLOADING)
    ImageWrittenSignalInfo                  ,
#endif
    afterImageWritten                       ,
    onImageWritten                          ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Vips.Callbacks as Vips.Callbacks
import {-# SOURCE #-} qualified GI.Vips.Enums as Vips.Enums
import {-# SOURCE #-} qualified GI.Vips.Objects.Object as Vips.Object
import {-# SOURCE #-} qualified GI.Vips.Objects.Region as Vips.Region
import {-# SOURCE #-} qualified GI.Vips.Structs.Rect as Vips.Rect

-- | Memory-managed wrapper type.
newtype Image = Image (SP.ManagedPtr Image)
    deriving (Image -> Image -> Bool
(Image -> Image -> Bool) -> (Image -> Image -> Bool) -> Eq Image
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Image -> Image -> Bool
$c/= :: Image -> Image -> Bool
== :: Image -> Image -> Bool
$c== :: Image -> Image -> Bool
Eq)

instance SP.ManagedPtrNewtype Image where
    toManagedPtr :: Image -> ManagedPtr Image
toManagedPtr (Image ManagedPtr Image
p) = ManagedPtr Image
p

foreign import ccall "vips_image_get_type"
    c_vips_image_get_type :: IO B.Types.GType

instance B.Types.TypedObject Image where
    glibType :: IO GType
glibType = IO GType
c_vips_image_get_type

instance B.Types.GObject Image

-- | Type class for types which can be safely cast to `Image`, for instance with `toImage`.
class (SP.GObject o, O.IsDescendantOf Image o) => IsImage o
instance (SP.GObject o, O.IsDescendantOf Image o) => IsImage o

instance O.HasParentTypes Image
type instance O.ParentTypes Image = '[Vips.Object.Object, GObject.Object.Object]

-- | Cast to `Image`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toImage :: (MIO.MonadIO m, IsImage o) => o -> m Image
toImage :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Image
toImage = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Image -> m Image) -> (o -> IO Image) -> o -> m Image
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Image -> Image) -> o -> IO Image
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Image -> Image
Image

-- | Convert 'Image' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Image) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_vips_image_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Image -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Image
P.Nothing = Ptr GValue -> Ptr Image -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Image
forall a. Ptr a
FP.nullPtr :: FP.Ptr Image)
    gvalueSet_ Ptr GValue
gv (P.Just Image
obj) = Image -> (Ptr Image -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Image
obj (Ptr GValue -> Ptr Image -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Image)
gvalueGet_ Ptr GValue
gv = do
        Ptr Image
ptr <- Ptr GValue -> IO (Ptr Image)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Image)
        if Ptr Image
ptr Ptr Image -> Ptr Image -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Image
forall a. Ptr a
FP.nullPtr
        then Image -> Maybe Image
forall a. a -> Maybe a
P.Just (Image -> Maybe Image) -> IO Image -> IO (Maybe Image)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Image -> Image
Image Ptr Image
ptr
        else Maybe Image -> IO (Maybe Image)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Image
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveImageMethod (t :: Symbol) (o :: *) :: * where
    ResolveImageMethod "argumentIsset" o = Vips.Object.ObjectArgumentIssetMethodInfo
    ResolveImageMethod "argumentNeedsstring" o = Vips.Object.ObjectArgumentNeedsstringMethodInfo
    ResolveImageMethod "autorotRemoveAngle" o = ImageAutorotRemoveAngleMethodInfo
    ResolveImageMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveImageMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveImageMethod "build" o = Vips.Object.ObjectBuildMethodInfo
    ResolveImageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveImageMethod "foreignLoadInvalidate" o = ImageForeignLoadInvalidateMethodInfo
    ResolveImageMethod "freeBuffer" o = ImageFreeBufferMethodInfo
    ResolveImageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveImageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveImageMethod "iccAc2rc" o = ImageIccAc2rcMethodInfo
    ResolveImageMethod "imageCopyMemory" o = ImageImageCopyMemoryMethodInfo
    ResolveImageMethod "imageDecode" o = ImageImageDecodeMethodInfo
    ResolveImageMethod "imageDecodePredict" o = ImageImageDecodePredictMethodInfo
    ResolveImageMethod "imageEncode" o = ImageImageEncodeMethodInfo
    ResolveImageMethod "imageGet" o = ImageImageGetMethodInfo
    ResolveImageMethod "imageGetArea" o = ImageImageGetAreaMethodInfo
    ResolveImageMethod "imageGetArrayDouble" o = ImageImageGetArrayDoubleMethodInfo
    ResolveImageMethod "imageGetArrayInt" o = ImageImageGetArrayIntMethodInfo
    ResolveImageMethod "imageGetAsString" o = ImageImageGetAsStringMethodInfo
    ResolveImageMethod "imageGetBands" o = ImageImageGetBandsMethodInfo
    ResolveImageMethod "imageGetBlob" o = ImageImageGetBlobMethodInfo
    ResolveImageMethod "imageGetCoding" o = ImageImageGetCodingMethodInfo
    ResolveImageMethod "imageGetData" o = ImageImageGetDataMethodInfo
    ResolveImageMethod "imageGetDouble" o = ImageImageGetDoubleMethodInfo
    ResolveImageMethod "imageGetFields" o = ImageImageGetFieldsMethodInfo
    ResolveImageMethod "imageGetFilename" o = ImageImageGetFilenameMethodInfo
    ResolveImageMethod "imageGetFormat" o = ImageImageGetFormatMethodInfo
    ResolveImageMethod "imageGetHeight" o = ImageImageGetHeightMethodInfo
    ResolveImageMethod "imageGetHistory" o = ImageImageGetHistoryMethodInfo
    ResolveImageMethod "imageGetImage" o = ImageImageGetImageMethodInfo
    ResolveImageMethod "imageGetInt" o = ImageImageGetIntMethodInfo
    ResolveImageMethod "imageGetInterpretation" o = ImageImageGetInterpretationMethodInfo
    ResolveImageMethod "imageGetMode" o = ImageImageGetModeMethodInfo
    ResolveImageMethod "imageGetNPages" o = ImageImageGetNPagesMethodInfo
    ResolveImageMethod "imageGetNSubifds" o = ImageImageGetNSubifdsMethodInfo
    ResolveImageMethod "imageGetOffset" o = ImageImageGetOffsetMethodInfo
    ResolveImageMethod "imageGetOrientation" o = ImageImageGetOrientationMethodInfo
    ResolveImageMethod "imageGetOrientationSwap" o = ImageImageGetOrientationSwapMethodInfo
    ResolveImageMethod "imageGetPageHeight" o = ImageImageGetPageHeightMethodInfo
    ResolveImageMethod "imageGetScale" o = ImageImageGetScaleMethodInfo
    ResolveImageMethod "imageGetString" o = ImageImageGetStringMethodInfo
    ResolveImageMethod "imageGetTypeof" o = ImageImageGetTypeofMethodInfo
    ResolveImageMethod "imageGetWidth" o = ImageImageGetWidthMethodInfo
    ResolveImageMethod "imageGetXoffset" o = ImageImageGetXoffsetMethodInfo
    ResolveImageMethod "imageGetXres" o = ImageImageGetXresMethodInfo
    ResolveImageMethod "imageGetYoffset" o = ImageImageGetYoffsetMethodInfo
    ResolveImageMethod "imageGetYres" o = ImageImageGetYresMethodInfo
    ResolveImageMethod "imageGuessFormat" o = ImageImageGuessFormatMethodInfo
    ResolveImageMethod "imageGuessInterpretation" o = ImageImageGuessInterpretationMethodInfo
    ResolveImageMethod "imageHasalpha" o = ImageImageHasalphaMethodInfo
    ResolveImageMethod "imageHistoryArgs" o = ImageImageHistoryArgsMethodInfo
    ResolveImageMethod "imageInitFields" o = ImageImageInitFieldsMethodInfo
    ResolveImageMethod "imageInplace" o = ImageImageInplaceMethodInfo
    ResolveImageMethod "imageInvalidateAll" o = ImageImageInvalidateAllMethodInfo
    ResolveImageMethod "imageIsMSBfirst" o = ImageImageIsMSBfirstMethodInfo
    ResolveImageMethod "imageIsSequential" o = ImageImageIsSequentialMethodInfo
    ResolveImageMethod "imageIsfile" o = ImageImageIsfileMethodInfo
    ResolveImageMethod "imageIskilled" o = ImageImageIskilledMethodInfo
    ResolveImageMethod "imageIspartial" o = ImageImageIspartialMethodInfo
    ResolveImageMethod "imageMap" o = ImageImageMapMethodInfo
    ResolveImageMethod "imageMinimiseAll" o = ImageImageMinimiseAllMethodInfo
    ResolveImageMethod "imagePioInput" o = ImageImagePioInputMethodInfo
    ResolveImageMethod "imagePioOutput" o = ImageImagePioOutputMethodInfo
    ResolveImageMethod "imagePrintField" o = ImageImagePrintFieldMethodInfo
    ResolveImageMethod "imageRemove" o = ImageImageRemoveMethodInfo
    ResolveImageMethod "imageSet" o = ImageImageSetMethodInfo
    ResolveImageMethod "imageSetArea" o = ImageImageSetAreaMethodInfo
    ResolveImageMethod "imageSetArrayDouble" o = ImageImageSetArrayDoubleMethodInfo
    ResolveImageMethod "imageSetArrayInt" o = ImageImageSetArrayIntMethodInfo
    ResolveImageMethod "imageSetBlob" o = ImageImageSetBlobMethodInfo
    ResolveImageMethod "imageSetBlobCopy" o = ImageImageSetBlobCopyMethodInfo
    ResolveImageMethod "imageSetDeleteOnClose" o = ImageImageSetDeleteOnCloseMethodInfo
    ResolveImageMethod "imageSetDouble" o = ImageImageSetDoubleMethodInfo
    ResolveImageMethod "imageSetImage" o = ImageImageSetImageMethodInfo
    ResolveImageMethod "imageSetInt" o = ImageImageSetIntMethodInfo
    ResolveImageMethod "imageSetKill" o = ImageImageSetKillMethodInfo
    ResolveImageMethod "imageSetProgress" o = ImageImageSetProgressMethodInfo
    ResolveImageMethod "imageSetString" o = ImageImageSetStringMethodInfo
    ResolveImageMethod "imageWioInput" o = ImageImageWioInputMethodInfo
    ResolveImageMethod "imageWrite" o = ImageImageWriteMethodInfo
    ResolveImageMethod "imageWriteLine" o = ImageImageWriteLineMethodInfo
    ResolveImageMethod "imageWritePrepare" o = ImageImageWritePrepareMethodInfo
    ResolveImageMethod "imageWriteToMemory" o = ImageImageWriteToMemoryMethodInfo
    ResolveImageMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveImageMethod "localCb" o = Vips.Object.ObjectLocalCbMethodInfo
    ResolveImageMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveImageMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveImageMethod "preclose" o = Vips.Object.ObjectPrecloseMethodInfo
    ResolveImageMethod "printDump" o = Vips.Object.ObjectPrintDumpMethodInfo
    ResolveImageMethod "printName" o = Vips.Object.ObjectPrintNameMethodInfo
    ResolveImageMethod "printSummary" o = Vips.Object.ObjectPrintSummaryMethodInfo
    ResolveImageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveImageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveImageMethod "reorderMarginHint" o = ImageReorderMarginHintMethodInfo
    ResolveImageMethod "reorderPrepareMany" o = ImageReorderPrepareManyMethodInfo
    ResolveImageMethod "rewind" o = Vips.Object.ObjectRewindMethodInfo
    ResolveImageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveImageMethod "sanity" o = Vips.Object.ObjectSanityMethodInfo
    ResolveImageMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveImageMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveImageMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveImageMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveImageMethod "unrefOutputs" o = Vips.Object.ObjectUnrefOutputsMethodInfo
    ResolveImageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveImageMethod "getArgumentFlags" o = Vips.Object.ObjectGetArgumentFlagsMethodInfo
    ResolveImageMethod "getArgumentPriority" o = Vips.Object.ObjectGetArgumentPriorityMethodInfo
    ResolveImageMethod "getArgumentToString" o = Vips.Object.ObjectGetArgumentToStringMethodInfo
    ResolveImageMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveImageMethod "getDescription" o = Vips.Object.ObjectGetDescriptionMethodInfo
    ResolveImageMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveImageMethod "setArgumentFromString" o = Vips.Object.ObjectSetArgumentFromStringMethodInfo
    ResolveImageMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveImageMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveImageMethod "setFromString" o = Vips.Object.ObjectSetFromStringMethodInfo
    ResolveImageMethod "setRequired" o = Vips.Object.ObjectSetRequiredMethodInfo
    ResolveImageMethod "setStatic" o = Vips.Object.ObjectSetStaticMethodInfo
    ResolveImageMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveImageMethod t Image, O.OverloadedMethod info Image p) => OL.IsLabel t (Image -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveImageMethod t Image, O.OverloadedMethod info Image p, R.HasField t Image p) => R.HasField t Image p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveImageMethod t Image, O.OverloadedMethodInfo info Image) => OL.IsLabel t (O.MethodProxy info Image) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal Image::eval
-- | The [eval](#g:signal: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 'GI.Vips.Objects.Image.imageImageSetProgress' to turn on progress reporting for an
-- image.
type ImageEvalCallback =
    Ptr ()
    -- ^ /@progress@/: t'GI.Vips.Structs.Progress.Progress' for this image
    -> IO ()

type C_ImageEvalCallback =
    Ptr Image ->                            -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ImageEvalCallback`.
foreign import ccall "wrapper"
    mk_ImageEvalCallback :: C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)

wrap_ImageEvalCallback :: 
    GObject a => (a -> ImageEvalCallback) ->
    C_ImageEvalCallback
wrap_ImageEvalCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageEvalCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
progress Ptr ()
_ = do
    Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self)  Ptr ()
progress


-- | Connect a signal handler for the [eval](#signal:eval) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' image #eval callback
-- @
-- 
-- 
onImageEval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageEvalCallback) -> m SignalHandlerId
onImageEval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImageEval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageEvalCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageEvalCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"eval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [eval](#signal:eval) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' image #eval callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterImageEval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageEvalCallback) -> m SignalHandlerId
afterImageEval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImageEval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageEvalCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageEvalCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"eval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ImageEvalSignalInfo
instance SignalInfo ImageEvalSignalInfo where
    type HaskellCallbackType ImageEvalSignalInfo = ImageEvalCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ImageEvalCallback cb
        cb'' <- mk_ImageEvalCallback cb'
        connectSignalFunPtr obj "eval" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image::eval"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:eval"})

#endif

-- signal Image::invalidate
-- | The [invalidate](#g:signal:invalidate) signal is emitted when an image or one of it\'s
-- upstream data sources has been destructively modified. See
-- 'GI.Vips.Objects.Image.imageImageInvalidateAll'.
type ImageInvalidateCallback =
    IO ()

type C_ImageInvalidateCallback =
    Ptr Image ->                            -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ImageInvalidateCallback`.
foreign import ccall "wrapper"
    mk_ImageInvalidateCallback :: C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)

wrap_ImageInvalidateCallback :: 
    GObject a => (a -> ImageInvalidateCallback) ->
    C_ImageInvalidateCallback
wrap_ImageInvalidateCallback :: forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageInvalidateCallback a -> IO ()
gi'cb Ptr Image
gi'selfPtr Ptr ()
_ = do
    Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> IO ()
gi'cb (Image -> a
Coerce.coerce Image
gi'self) 


-- | Connect a signal handler for the [invalidate](#signal:invalidate) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' image #invalidate callback
-- @
-- 
-- 
onImageInvalidate :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageInvalidateCallback) -> m SignalHandlerId
onImageInvalidate :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onImageInvalidate a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageInvalidateCallback a -> IO ()
wrapped
    FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageInvalidateCallback C_ImageInvalidateCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"invalidate" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [invalidate](#signal:invalidate) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' image #invalidate callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterImageInvalidate :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageInvalidateCallback) -> m SignalHandlerId
afterImageInvalidate :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterImageInvalidate a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageInvalidateCallback a -> IO ()
wrapped
    FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageInvalidateCallback C_ImageInvalidateCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"invalidate" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ImageInvalidateSignalInfo
instance SignalInfo ImageInvalidateSignalInfo where
    type HaskellCallbackType ImageInvalidateSignalInfo = ImageInvalidateCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ImageInvalidateCallback cb
        cb'' <- mk_ImageInvalidateCallback cb'
        connectSignalFunPtr obj "invalidate" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image::invalidate"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:invalidate"})

#endif

-- signal Image::minimise
-- | The [minimise](#g:signal:minimise) signal is emitted when an image has been asked to
-- minimise memory usage. All non-essential caches are dropped.
-- See
-- 'GI.Vips.Objects.Image.imageImageMinimiseAll'.
type ImageMinimiseCallback =
    IO ()

type C_ImageMinimiseCallback =
    Ptr Image ->                            -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ImageMinimiseCallback`.
foreign import ccall "wrapper"
    mk_ImageMinimiseCallback :: C_ImageMinimiseCallback -> IO (FunPtr C_ImageMinimiseCallback)

wrap_ImageMinimiseCallback :: 
    GObject a => (a -> ImageMinimiseCallback) ->
    C_ImageMinimiseCallback
wrap_ImageMinimiseCallback :: forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageMinimiseCallback a -> IO ()
gi'cb Ptr Image
gi'selfPtr Ptr ()
_ = do
    Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> IO ()
gi'cb (Image -> a
Coerce.coerce Image
gi'self) 


-- | Connect a signal handler for the [minimise](#signal:minimise) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' image #minimise callback
-- @
-- 
-- 
onImageMinimise :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageMinimiseCallback) -> m SignalHandlerId
onImageMinimise :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onImageMinimise a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageMinimiseCallback a -> IO ()
wrapped
    FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageMinimiseCallback C_ImageInvalidateCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"minimise" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [minimise](#signal:minimise) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' image #minimise callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterImageMinimise :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageMinimiseCallback) -> m SignalHandlerId
afterImageMinimise :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterImageMinimise a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ImageInvalidateCallback
wrapped' = (a -> IO ()) -> C_ImageInvalidateCallback
forall a. GObject a => (a -> IO ()) -> C_ImageInvalidateCallback
wrap_ImageMinimiseCallback a -> IO ()
wrapped
    FunPtr C_ImageInvalidateCallback
wrapped'' <- C_ImageInvalidateCallback -> IO (FunPtr C_ImageInvalidateCallback)
mk_ImageMinimiseCallback C_ImageInvalidateCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageInvalidateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"minimise" FunPtr C_ImageInvalidateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ImageMinimiseSignalInfo
instance SignalInfo ImageMinimiseSignalInfo where
    type HaskellCallbackType ImageMinimiseSignalInfo = ImageMinimiseCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ImageMinimiseCallback cb
        cb'' <- mk_ImageMinimiseCallback cb'
        connectSignalFunPtr obj "minimise" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image::minimise"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:minimise"})

#endif

-- signal Image::posteval
-- | The [posteval](#g:signal:posteval) signal is emitted once at the end of the computation
-- of /@image@/. It\'s a good place to shut down evaluation feedback.
-- 
-- Use 'GI.Vips.Objects.Image.imageImageSetProgress' to turn on progress reporting for an
-- image.
type ImagePostevalCallback =
    Ptr ()
    -- ^ /@progress@/: t'GI.Vips.Structs.Progress.Progress' for this image
    -> IO ()

type C_ImagePostevalCallback =
    Ptr Image ->                            -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ImagePostevalCallback`.
foreign import ccall "wrapper"
    mk_ImagePostevalCallback :: C_ImagePostevalCallback -> IO (FunPtr C_ImagePostevalCallback)

wrap_ImagePostevalCallback :: 
    GObject a => (a -> ImagePostevalCallback) ->
    C_ImagePostevalCallback
wrap_ImagePostevalCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePostevalCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
progress Ptr ()
_ = do
    Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self)  Ptr ()
progress


-- | Connect a signal handler for the [posteval](#signal:posteval) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' image #posteval callback
-- @
-- 
-- 
onImagePosteval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePostevalCallback) -> m SignalHandlerId
onImagePosteval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImagePosteval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePostevalCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePostevalCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"posteval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [posteval](#signal:posteval) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' image #posteval callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterImagePosteval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePostevalCallback) -> m SignalHandlerId
afterImagePosteval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImagePosteval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePostevalCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePostevalCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"posteval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ImagePostevalSignalInfo
instance SignalInfo ImagePostevalSignalInfo where
    type HaskellCallbackType ImagePostevalSignalInfo = ImagePostevalCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ImagePostevalCallback cb
        cb'' <- mk_ImagePostevalCallback cb'
        connectSignalFunPtr obj "posteval" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image::posteval"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:posteval"})

#endif

-- signal Image::preeval
-- | The [preeval](#g:signal:preeval) signal is emitted once before computation of /@image@/
-- starts. It\'s a good place to set up evaluation feedback.
-- 
-- Use 'GI.Vips.Objects.Image.imageImageSetProgress' to turn on progress reporting for an
-- image.
type ImagePreevalCallback =
    Ptr ()
    -- ^ /@progress@/: t'GI.Vips.Structs.Progress.Progress' for this image
    -> IO ()

type C_ImagePreevalCallback =
    Ptr Image ->                            -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ImagePreevalCallback`.
foreign import ccall "wrapper"
    mk_ImagePreevalCallback :: C_ImagePreevalCallback -> IO (FunPtr C_ImagePreevalCallback)

wrap_ImagePreevalCallback :: 
    GObject a => (a -> ImagePreevalCallback) ->
    C_ImagePreevalCallback
wrap_ImagePreevalCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePreevalCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
progress Ptr ()
_ = do
    Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self)  Ptr ()
progress


-- | Connect a signal handler for the [preeval](#signal:preeval) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' image #preeval callback
-- @
-- 
-- 
onImagePreeval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePreevalCallback) -> m SignalHandlerId
onImagePreeval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImagePreeval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePreevalCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePreevalCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"preeval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [preeval](#signal:preeval) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' image #preeval callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterImagePreeval :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImagePreevalCallback) -> m SignalHandlerId
afterImagePreeval :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImagePreeval a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImagePreevalCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImagePreevalCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"preeval" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ImagePreevalSignalInfo
instance SignalInfo ImagePreevalSignalInfo where
    type HaskellCallbackType ImagePreevalSignalInfo = ImagePreevalCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ImagePreevalCallback cb
        cb'' <- mk_ImagePreevalCallback cb'
        connectSignalFunPtr obj "preeval" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image::preeval"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:preeval"})

#endif

-- signal Image::written
-- | The [written](#g:signal: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.
type ImageWrittenCallback =
    Ptr ()
    -- ^ /@result@/: set to non-zero to indicate error
    -> IO ()

type C_ImageWrittenCallback =
    Ptr Image ->                            -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ImageWrittenCallback`.
foreign import ccall "wrapper"
    mk_ImageWrittenCallback :: C_ImageWrittenCallback -> IO (FunPtr C_ImageWrittenCallback)

wrap_ImageWrittenCallback :: 
    GObject a => (a -> ImageWrittenCallback) ->
    C_ImageWrittenCallback
wrap_ImageWrittenCallback :: forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageWrittenCallback a -> ImageEvalCallback
gi'cb Ptr Image
gi'selfPtr Ptr ()
result_ Ptr ()
_ = do
    Ptr Image -> (Image -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Image
gi'selfPtr ((Image -> IO ()) -> IO ()) -> (Image -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Image
gi'self -> a -> ImageEvalCallback
gi'cb (Image -> a
Coerce.coerce Image
gi'self)  Ptr ()
result_


-- | Connect a signal handler for the [written](#signal:written) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' image #written callback
-- @
-- 
-- 
onImageWritten :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageWrittenCallback) -> m SignalHandlerId
onImageWritten :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
onImageWritten a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageWrittenCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageWrittenCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"written" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [written](#signal:written) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' image #written callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterImageWritten :: (IsImage a, MonadIO m) => a -> ((?self :: a) => ImageWrittenCallback) -> m SignalHandlerId
afterImageWritten :: forall a (m :: * -> *).
(IsImage a, MonadIO m) =>
a -> ((?self::a) => ImageEvalCallback) -> m SignalHandlerId
afterImageWritten a
obj (?self::a) => ImageEvalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ImageEvalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ImageEvalCallback
ImageEvalCallback
cb
    let wrapped' :: C_ImageEvalCallback
wrapped' = (a -> ImageEvalCallback) -> C_ImageEvalCallback
forall a.
GObject a =>
(a -> ImageEvalCallback) -> C_ImageEvalCallback
wrap_ImageWrittenCallback a -> ImageEvalCallback
wrapped
    FunPtr C_ImageEvalCallback
wrapped'' <- C_ImageEvalCallback -> IO (FunPtr C_ImageEvalCallback)
mk_ImageWrittenCallback C_ImageEvalCallback
wrapped'
    a
-> Text
-> FunPtr C_ImageEvalCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"written" FunPtr C_ImageEvalCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ImageWrittenSignalInfo
instance SignalInfo ImageWrittenSignalInfo where
    type HaskellCallbackType ImageWrittenSignalInfo = ImageWrittenCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ImageWrittenCallback cb
        cb'' <- mk_ImageWrittenCallback cb'
        connectSignalFunPtr obj "written" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image::written"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:signal:written"})

#endif

-- VVV Prop "bands"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@bands@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #bands
-- @
getImageBands :: (MonadIO m, IsImage o) => o -> m Int32
getImageBands :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageBands o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"bands"

-- | Set the value of the “@bands@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #bands 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageBands :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageBands :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageBands o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"bands" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@bands@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageBands :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageBands :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageBands Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"bands" Int32
val

#if defined(ENABLE_OVERLOADING)
data ImageBandsPropertyInfo
instance AttrInfo ImageBandsPropertyInfo where
    type AttrAllowedOps ImageBandsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageBandsPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageBandsPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint ImageBandsPropertyInfo = (~) Int32
    type AttrTransferType ImageBandsPropertyInfo = Int32
    type AttrGetType ImageBandsPropertyInfo = Int32
    type AttrLabel ImageBandsPropertyInfo = "bands"
    type AttrOrigin ImageBandsPropertyInfo = Image
    attrGet = getImageBands
    attrSet = setImageBands
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageBands
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.bands"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:bands"
        })
#endif

-- VVV Prop "coding"
   -- Type: TInterface (Name {namespace = "Vips", name = "Coding"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@coding@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #coding
-- @
getImageCoding :: (MonadIO m, IsImage o) => o -> m Vips.Enums.Coding
getImageCoding :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Coding
getImageCoding o
obj = IO Coding -> m Coding
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Coding -> m Coding) -> IO Coding -> m Coding
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Coding
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"coding"

-- | Set the value of the “@coding@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #coding 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageCoding :: (MonadIO m, IsImage o) => o -> Vips.Enums.Coding -> m ()
setImageCoding :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Coding -> m ()
setImageCoding o
obj Coding
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Coding -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"coding" Coding
val

-- | Construct a `GValueConstruct` with valid value for the “@coding@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageCoding :: (IsImage o, MIO.MonadIO m) => Vips.Enums.Coding -> m (GValueConstruct o)
constructImageCoding :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Coding -> m (GValueConstruct o)
constructImageCoding Coding
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Coding -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"coding" Coding
val

#if defined(ENABLE_OVERLOADING)
data ImageCodingPropertyInfo
instance AttrInfo ImageCodingPropertyInfo where
    type AttrAllowedOps ImageCodingPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageCodingPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageCodingPropertyInfo = (~) Vips.Enums.Coding
    type AttrTransferTypeConstraint ImageCodingPropertyInfo = (~) Vips.Enums.Coding
    type AttrTransferType ImageCodingPropertyInfo = Vips.Enums.Coding
    type AttrGetType ImageCodingPropertyInfo = Vips.Enums.Coding
    type AttrLabel ImageCodingPropertyInfo = "coding"
    type AttrOrigin ImageCodingPropertyInfo = Image
    attrGet = getImageCoding
    attrSet = setImageCoding
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageCoding
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.coding"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:coding"
        })
#endif

-- VVV Prop "demand"
   -- Type: TInterface (Name {namespace = "Vips", name = "DemandStyle"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@demand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #demand
-- @
getImageDemand :: (MonadIO m, IsImage o) => o -> m Vips.Enums.DemandStyle
getImageDemand :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m DemandStyle
getImageDemand o
obj = IO DemandStyle -> m DemandStyle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DemandStyle -> m DemandStyle)
-> IO DemandStyle -> m DemandStyle
forall a b. (a -> b) -> a -> b
$ o -> String -> IO DemandStyle
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"demand"

-- | Set the value of the “@demand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #demand 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageDemand :: (MonadIO m, IsImage o) => o -> Vips.Enums.DemandStyle -> m ()
setImageDemand :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> DemandStyle -> m ()
setImageDemand o
obj DemandStyle
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> DemandStyle -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"demand" DemandStyle
val

-- | Construct a `GValueConstruct` with valid value for the “@demand@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageDemand :: (IsImage o, MIO.MonadIO m) => Vips.Enums.DemandStyle -> m (GValueConstruct o)
constructImageDemand :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
DemandStyle -> m (GValueConstruct o)
constructImageDemand DemandStyle
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> DemandStyle -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"demand" DemandStyle
val

#if defined(ENABLE_OVERLOADING)
data ImageDemandPropertyInfo
instance AttrInfo ImageDemandPropertyInfo where
    type AttrAllowedOps ImageDemandPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageDemandPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageDemandPropertyInfo = (~) Vips.Enums.DemandStyle
    type AttrTransferTypeConstraint ImageDemandPropertyInfo = (~) Vips.Enums.DemandStyle
    type AttrTransferType ImageDemandPropertyInfo = Vips.Enums.DemandStyle
    type AttrGetType ImageDemandPropertyInfo = Vips.Enums.DemandStyle
    type AttrLabel ImageDemandPropertyInfo = "demand"
    type AttrOrigin ImageDemandPropertyInfo = Image
    attrGet = getImageDemand
    attrSet = setImageDemand
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageDemand
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.demand"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:demand"
        })
#endif

-- VVV Prop "filename"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@filename@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #filename
-- @
getImageFilename :: (MonadIO m, IsImage o) => o -> m (Maybe T.Text)
getImageFilename :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Text)
getImageFilename o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"filename"

-- | Set the value of the “@filename@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #filename 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageFilename :: (MonadIO m, IsImage o) => o -> T.Text -> m ()
setImageFilename :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Text -> m ()
setImageFilename o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"filename" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@filename@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageFilename :: (IsImage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructImageFilename :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructImageFilename Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"filename" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

-- | Set the value of the “@filename@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #filename
-- @
clearImageFilename :: (MonadIO m, IsImage o) => o -> m ()
clearImageFilename :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageFilename o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"filename" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data ImageFilenamePropertyInfo
instance AttrInfo ImageFilenamePropertyInfo where
    type AttrAllowedOps ImageFilenamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ImageFilenamePropertyInfo = IsImage
    type AttrSetTypeConstraint ImageFilenamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint ImageFilenamePropertyInfo = (~) T.Text
    type AttrTransferType ImageFilenamePropertyInfo = T.Text
    type AttrGetType ImageFilenamePropertyInfo = (Maybe T.Text)
    type AttrLabel ImageFilenamePropertyInfo = "filename"
    type AttrOrigin ImageFilenamePropertyInfo = Image
    attrGet = getImageFilename
    attrSet = setImageFilename
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageFilename
    attrClear = clearImageFilename
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.filename"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:filename"
        })
#endif

-- VVV Prop "foreign-buffer"
   -- Type: TBasicType TPtr
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@foreign-buffer@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #foreignBuffer
-- @
getImageForeignBuffer :: (MonadIO m, IsImage o) => o -> m (Ptr ())
getImageForeignBuffer :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m (Ptr ())
getImageForeignBuffer o
obj = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Ptr ())
forall a b. GObject a => a -> String -> IO (Ptr b)
B.Properties.getObjectPropertyPtr o
obj String
"foreign-buffer"

-- | Set the value of the “@foreign-buffer@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #foreignBuffer 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageForeignBuffer :: (MonadIO m, IsImage o) => o -> Ptr () -> m ()
setImageForeignBuffer :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Ptr () -> m ()
setImageForeignBuffer o
obj Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> ImageEvalCallback
forall a b. GObject a => a -> String -> Ptr b -> IO ()
B.Properties.setObjectPropertyPtr o
obj String
"foreign-buffer" Ptr ()
val

-- | Construct a `GValueConstruct` with valid value for the “@foreign-buffer@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageForeignBuffer :: (IsImage o, MIO.MonadIO m) => Ptr () -> m (GValueConstruct o)
constructImageForeignBuffer :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Ptr () -> m (GValueConstruct o)
constructImageForeignBuffer Ptr ()
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Ptr () -> IO (GValueConstruct o)
forall b o. String -> Ptr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyPtr String
"foreign-buffer" Ptr ()
val

#if defined(ENABLE_OVERLOADING)
data ImageForeignBufferPropertyInfo
instance AttrInfo ImageForeignBufferPropertyInfo where
    type AttrAllowedOps ImageForeignBufferPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageForeignBufferPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageForeignBufferPropertyInfo = (~) (Ptr ())
    type AttrTransferTypeConstraint ImageForeignBufferPropertyInfo = (~) (Ptr ())
    type AttrTransferType ImageForeignBufferPropertyInfo = Ptr ()
    type AttrGetType ImageForeignBufferPropertyInfo = (Ptr ())
    type AttrLabel ImageForeignBufferPropertyInfo = "foreign-buffer"
    type AttrOrigin ImageForeignBufferPropertyInfo = Image
    attrGet = getImageForeignBuffer
    attrSet = setImageForeignBuffer
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageForeignBuffer
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.foreignBuffer"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:foreignBuffer"
        })
#endif

-- VVV Prop "format"
   -- Type: TInterface (Name {namespace = "Vips", name = "BandFormat"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@format@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #format
-- @
getImageFormat :: (MonadIO m, IsImage o) => o -> m Vips.Enums.BandFormat
getImageFormat :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m BandFormat
getImageFormat o
obj = IO BandFormat -> m BandFormat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO BandFormat -> m BandFormat) -> IO BandFormat -> m BandFormat
forall a b. (a -> b) -> a -> b
$ o -> String -> IO BandFormat
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"format"

-- | Set the value of the “@format@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #format 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageFormat :: (MonadIO m, IsImage o) => o -> Vips.Enums.BandFormat -> m ()
setImageFormat :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> BandFormat -> m ()
setImageFormat o
obj BandFormat
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> BandFormat -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"format" BandFormat
val

-- | Construct a `GValueConstruct` with valid value for the “@format@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageFormat :: (IsImage o, MIO.MonadIO m) => Vips.Enums.BandFormat -> m (GValueConstruct o)
constructImageFormat :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
BandFormat -> m (GValueConstruct o)
constructImageFormat BandFormat
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> BandFormat -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"format" BandFormat
val

#if defined(ENABLE_OVERLOADING)
data ImageFormatPropertyInfo
instance AttrInfo ImageFormatPropertyInfo where
    type AttrAllowedOps ImageFormatPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageFormatPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageFormatPropertyInfo = (~) Vips.Enums.BandFormat
    type AttrTransferTypeConstraint ImageFormatPropertyInfo = (~) Vips.Enums.BandFormat
    type AttrTransferType ImageFormatPropertyInfo = Vips.Enums.BandFormat
    type AttrGetType ImageFormatPropertyInfo = Vips.Enums.BandFormat
    type AttrLabel ImageFormatPropertyInfo = "format"
    type AttrOrigin ImageFormatPropertyInfo = Image
    attrGet = getImageFormat
    attrSet = setImageFormat
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageFormat
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.format"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:format"
        })
#endif

-- VVV Prop "height"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@height@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #height
-- @
getImageHeight :: (MonadIO m, IsImage o) => o -> m Int32
getImageHeight :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageHeight o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"height"

-- | Set the value of the “@height@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #height 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageHeight :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageHeight :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageHeight o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"height" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@height@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageHeight :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageHeight :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageHeight Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"height" Int32
val

#if defined(ENABLE_OVERLOADING)
data ImageHeightPropertyInfo
instance AttrInfo ImageHeightPropertyInfo where
    type AttrAllowedOps ImageHeightPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageHeightPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageHeightPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint ImageHeightPropertyInfo = (~) Int32
    type AttrTransferType ImageHeightPropertyInfo = Int32
    type AttrGetType ImageHeightPropertyInfo = Int32
    type AttrLabel ImageHeightPropertyInfo = "height"
    type AttrOrigin ImageHeightPropertyInfo = Image
    attrGet = getImageHeight
    attrSet = setImageHeight
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageHeight
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.height"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:height"
        })
#endif

-- VVV Prop "interpretation"
   -- Type: TInterface (Name {namespace = "Vips", name = "Interpretation"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@interpretation@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #interpretation
-- @
getImageInterpretation :: (MonadIO m, IsImage o) => o -> m Vips.Enums.Interpretation
getImageInterpretation :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m Interpretation
getImageInterpretation o
obj = IO Interpretation -> m Interpretation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Interpretation -> m Interpretation)
-> IO Interpretation -> m Interpretation
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Interpretation
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"interpretation"

-- | Set the value of the “@interpretation@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #interpretation 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageInterpretation :: (MonadIO m, IsImage o) => o -> Vips.Enums.Interpretation -> m ()
setImageInterpretation :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Interpretation -> m ()
setImageInterpretation o
obj Interpretation
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Interpretation -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"interpretation" Interpretation
val

-- | Construct a `GValueConstruct` with valid value for the “@interpretation@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageInterpretation :: (IsImage o, MIO.MonadIO m) => Vips.Enums.Interpretation -> m (GValueConstruct o)
constructImageInterpretation :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Interpretation -> m (GValueConstruct o)
constructImageInterpretation Interpretation
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Interpretation -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"interpretation" Interpretation
val

#if defined(ENABLE_OVERLOADING)
data ImageInterpretationPropertyInfo
instance AttrInfo ImageInterpretationPropertyInfo where
    type AttrAllowedOps ImageInterpretationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageInterpretationPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageInterpretationPropertyInfo = (~) Vips.Enums.Interpretation
    type AttrTransferTypeConstraint ImageInterpretationPropertyInfo = (~) Vips.Enums.Interpretation
    type AttrTransferType ImageInterpretationPropertyInfo = Vips.Enums.Interpretation
    type AttrGetType ImageInterpretationPropertyInfo = Vips.Enums.Interpretation
    type AttrLabel ImageInterpretationPropertyInfo = "interpretation"
    type AttrOrigin ImageInterpretationPropertyInfo = Image
    attrGet = getImageInterpretation
    attrSet = setImageInterpretation
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageInterpretation
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.interpretation"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:interpretation"
        })
#endif

-- VVV Prop "kill"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@kill@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #kill
-- @
getImageKill :: (MonadIO m, IsImage o) => o -> m Bool
getImageKill :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Bool
getImageKill o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"kill"

-- | Set the value of the “@kill@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #kill 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageKill :: (MonadIO m, IsImage o) => o -> Bool -> m ()
setImageKill :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Bool -> m ()
setImageKill o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"kill" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@kill@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageKill :: (IsImage o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructImageKill :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructImageKill Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"kill" Bool
val

#if defined(ENABLE_OVERLOADING)
data ImageKillPropertyInfo
instance AttrInfo ImageKillPropertyInfo where
    type AttrAllowedOps ImageKillPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageKillPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageKillPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint ImageKillPropertyInfo = (~) Bool
    type AttrTransferType ImageKillPropertyInfo = Bool
    type AttrGetType ImageKillPropertyInfo = Bool
    type AttrLabel ImageKillPropertyInfo = "kill"
    type AttrOrigin ImageKillPropertyInfo = Image
    attrGet = getImageKill
    attrSet = setImageKill
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageKill
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.kill"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:kill"
        })
#endif

-- VVV Prop "mode"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@mode@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #mode
-- @
getImageMode :: (MonadIO m, IsImage o) => o -> m (Maybe T.Text)
getImageMode :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> m (Maybe Text)
getImageMode o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"mode"

-- | Set the value of the “@mode@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #mode 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageMode :: (MonadIO m, IsImage o) => o -> T.Text -> m ()
setImageMode :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> Text -> m ()
setImageMode o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"mode" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@mode@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageMode :: (IsImage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructImageMode :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructImageMode Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"mode" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

-- | Set the value of the “@mode@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #mode
-- @
clearImageMode :: (MonadIO m, IsImage o) => o -> m ()
clearImageMode :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m ()
clearImageMode o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"mode" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data ImageModePropertyInfo
instance AttrInfo ImageModePropertyInfo where
    type AttrAllowedOps ImageModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ImageModePropertyInfo = IsImage
    type AttrSetTypeConstraint ImageModePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint ImageModePropertyInfo = (~) T.Text
    type AttrTransferType ImageModePropertyInfo = T.Text
    type AttrGetType ImageModePropertyInfo = (Maybe T.Text)
    type AttrLabel ImageModePropertyInfo = "mode"
    type AttrOrigin ImageModePropertyInfo = Image
    attrGet = getImageMode
    attrSet = setImageMode
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageMode
    attrClear = clearImageMode
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.mode"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:mode"
        })
#endif

-- VVV Prop "sizeof-header"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@sizeof-header@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #sizeofHeader
-- @
getImageSizeofHeader :: (MonadIO m, IsImage o) => o -> m Word64
getImageSizeofHeader :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Word64
getImageSizeofHeader o
obj = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"sizeof-header"

-- | Set the value of the “@sizeof-header@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #sizeofHeader 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageSizeofHeader :: (MonadIO m, IsImage o) => o -> Word64 -> m ()
setImageSizeofHeader :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Word64 -> m ()
setImageSizeofHeader o
obj Word64
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"sizeof-header" Word64
val

-- | Construct a `GValueConstruct` with valid value for the “@sizeof-header@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageSizeofHeader :: (IsImage o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
constructImageSizeofHeader :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Word64 -> m (GValueConstruct o)
constructImageSizeofHeader Word64
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"sizeof-header" Word64
val

#if defined(ENABLE_OVERLOADING)
data ImageSizeofHeaderPropertyInfo
instance AttrInfo ImageSizeofHeaderPropertyInfo where
    type AttrAllowedOps ImageSizeofHeaderPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageSizeofHeaderPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageSizeofHeaderPropertyInfo = (~) Word64
    type AttrTransferTypeConstraint ImageSizeofHeaderPropertyInfo = (~) Word64
    type AttrTransferType ImageSizeofHeaderPropertyInfo = Word64
    type AttrGetType ImageSizeofHeaderPropertyInfo = Word64
    type AttrLabel ImageSizeofHeaderPropertyInfo = "sizeof-header"
    type AttrOrigin ImageSizeofHeaderPropertyInfo = Image
    attrGet = getImageSizeofHeader
    attrSet = setImageSizeofHeader
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageSizeofHeader
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.sizeofHeader"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:sizeofHeader"
        })
#endif

-- VVV Prop "width"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@width@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #width
-- @
getImageWidth :: (MonadIO m, IsImage o) => o -> m Int32
getImageWidth :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageWidth o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"width"

-- | Set the value of the “@width@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #width 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageWidth :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageWidth :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageWidth o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"width" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@width@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageWidth :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageWidth :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageWidth Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"width" Int32
val

#if defined(ENABLE_OVERLOADING)
data ImageWidthPropertyInfo
instance AttrInfo ImageWidthPropertyInfo where
    type AttrAllowedOps ImageWidthPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageWidthPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageWidthPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint ImageWidthPropertyInfo = (~) Int32
    type AttrTransferType ImageWidthPropertyInfo = Int32
    type AttrGetType ImageWidthPropertyInfo = Int32
    type AttrLabel ImageWidthPropertyInfo = "width"
    type AttrOrigin ImageWidthPropertyInfo = Image
    attrGet = getImageWidth
    attrSet = setImageWidth
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageWidth
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.width"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:width"
        })
#endif

-- VVV Prop "xoffset"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@xoffset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #xoffset
-- @
getImageXoffset :: (MonadIO m, IsImage o) => o -> m Int32
getImageXoffset :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageXoffset o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"xoffset"

-- | Set the value of the “@xoffset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #xoffset 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageXoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageXoffset :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageXoffset o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"xoffset" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@xoffset@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageXoffset :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageXoffset :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageXoffset Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"xoffset" Int32
val

#if defined(ENABLE_OVERLOADING)
data ImageXoffsetPropertyInfo
instance AttrInfo ImageXoffsetPropertyInfo where
    type AttrAllowedOps ImageXoffsetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageXoffsetPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageXoffsetPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint ImageXoffsetPropertyInfo = (~) Int32
    type AttrTransferType ImageXoffsetPropertyInfo = Int32
    type AttrGetType ImageXoffsetPropertyInfo = Int32
    type AttrLabel ImageXoffsetPropertyInfo = "xoffset"
    type AttrOrigin ImageXoffsetPropertyInfo = Image
    attrGet = getImageXoffset
    attrSet = setImageXoffset
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageXoffset
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.xoffset"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:xoffset"
        })
#endif

-- VVV Prop "xres"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@xres@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #xres
-- @
getImageXres :: (MonadIO m, IsImage o) => o -> m Double
getImageXres :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Double
getImageXres o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj String
"xres"

-- | Set the value of the “@xres@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #xres 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageXres :: (MonadIO m, IsImage o) => o -> Double -> m ()
setImageXres :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Double -> m ()
setImageXres o
obj Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj String
"xres" Double
val

-- | Construct a `GValueConstruct` with valid value for the “@xres@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageXres :: (IsImage o, MIO.MonadIO m) => Double -> m (GValueConstruct o)
constructImageXres :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Double -> m (GValueConstruct o)
constructImageXres Double
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble String
"xres" Double
val

#if defined(ENABLE_OVERLOADING)
data ImageXresPropertyInfo
instance AttrInfo ImageXresPropertyInfo where
    type AttrAllowedOps ImageXresPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageXresPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageXresPropertyInfo = (~) Double
    type AttrTransferTypeConstraint ImageXresPropertyInfo = (~) Double
    type AttrTransferType ImageXresPropertyInfo = Double
    type AttrGetType ImageXresPropertyInfo = Double
    type AttrLabel ImageXresPropertyInfo = "xres"
    type AttrOrigin ImageXresPropertyInfo = Image
    attrGet = getImageXres
    attrSet = setImageXres
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageXres
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.xres"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:xres"
        })
#endif

-- VVV Prop "yoffset"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@yoffset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #yoffset
-- @
getImageYoffset :: (MonadIO m, IsImage o) => o -> m Int32
getImageYoffset :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Int32
getImageYoffset o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"yoffset"

-- | Set the value of the “@yoffset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #yoffset 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageYoffset :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
setImageYoffset :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Int32 -> m ()
setImageYoffset o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"yoffset" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@yoffset@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageYoffset :: (IsImage o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructImageYoffset :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructImageYoffset Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"yoffset" Int32
val

#if defined(ENABLE_OVERLOADING)
data ImageYoffsetPropertyInfo
instance AttrInfo ImageYoffsetPropertyInfo where
    type AttrAllowedOps ImageYoffsetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageYoffsetPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageYoffsetPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint ImageYoffsetPropertyInfo = (~) Int32
    type AttrTransferType ImageYoffsetPropertyInfo = Int32
    type AttrGetType ImageYoffsetPropertyInfo = Int32
    type AttrLabel ImageYoffsetPropertyInfo = "yoffset"
    type AttrOrigin ImageYoffsetPropertyInfo = Image
    attrGet = getImageYoffset
    attrSet = setImageYoffset
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageYoffset
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.yoffset"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:yoffset"
        })
#endif

-- VVV Prop "yres"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@yres@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' image #yres
-- @
getImageYres :: (MonadIO m, IsImage o) => o -> m Double
getImageYres :: forall (m :: * -> *) o. (MonadIO m, IsImage o) => o -> m Double
getImageYres o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj String
"yres"

-- | Set the value of the “@yres@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' image [ #yres 'Data.GI.Base.Attributes.:=' value ]
-- @
setImageYres :: (MonadIO m, IsImage o) => o -> Double -> m ()
setImageYres :: forall (m :: * -> *) o.
(MonadIO m, IsImage o) =>
o -> Double -> m ()
setImageYres o
obj Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj String
"yres" Double
val

-- | Construct a `GValueConstruct` with valid value for the “@yres@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructImageYres :: (IsImage o, MIO.MonadIO m) => Double -> m (GValueConstruct o)
constructImageYres :: forall o (m :: * -> *).
(IsImage o, MonadIO m) =>
Double -> m (GValueConstruct o)
constructImageYres Double
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble String
"yres" Double
val

#if defined(ENABLE_OVERLOADING)
data ImageYresPropertyInfo
instance AttrInfo ImageYresPropertyInfo where
    type AttrAllowedOps ImageYresPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ImageYresPropertyInfo = IsImage
    type AttrSetTypeConstraint ImageYresPropertyInfo = (~) Double
    type AttrTransferTypeConstraint ImageYresPropertyInfo = (~) Double
    type AttrTransferType ImageYresPropertyInfo = Double
    type AttrGetType ImageYresPropertyInfo = Double
    type AttrLabel ImageYresPropertyInfo = "yres"
    type AttrOrigin ImageYresPropertyInfo = Image
    attrGet = getImageYres
    attrSet = setImageYres
    attrTransfer _ v = do
        return v
    attrConstruct = constructImageYres
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.yres"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#g:attr:yres"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Image
type instance O.AttributeList Image = ImageAttributeList
type ImageAttributeList = ('[ '("bands", ImageBandsPropertyInfo), '("coding", ImageCodingPropertyInfo), '("demand", ImageDemandPropertyInfo), '("description", Vips.Object.ObjectDescriptionPropertyInfo), '("filename", ImageFilenamePropertyInfo), '("foreignBuffer", ImageForeignBufferPropertyInfo), '("format", ImageFormatPropertyInfo), '("height", ImageHeightPropertyInfo), '("interpretation", ImageInterpretationPropertyInfo), '("kill", ImageKillPropertyInfo), '("mode", ImageModePropertyInfo), '("nickname", Vips.Object.ObjectNicknamePropertyInfo), '("sizeofHeader", ImageSizeofHeaderPropertyInfo), '("width", ImageWidthPropertyInfo), '("xoffset", ImageXoffsetPropertyInfo), '("xres", ImageXresPropertyInfo), '("yoffset", ImageYoffsetPropertyInfo), '("yres", ImageYresPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
imageBands :: AttrLabelProxy "bands"
imageBands = AttrLabelProxy

imageCoding :: AttrLabelProxy "coding"
imageCoding = AttrLabelProxy

imageDemand :: AttrLabelProxy "demand"
imageDemand = AttrLabelProxy

imageFilename :: AttrLabelProxy "filename"
imageFilename = AttrLabelProxy

imageForeignBuffer :: AttrLabelProxy "foreignBuffer"
imageForeignBuffer = AttrLabelProxy

imageFormat :: AttrLabelProxy "format"
imageFormat = AttrLabelProxy

imageHeight :: AttrLabelProxy "height"
imageHeight = AttrLabelProxy

imageInterpretation :: AttrLabelProxy "interpretation"
imageInterpretation = AttrLabelProxy

imageKill :: AttrLabelProxy "kill"
imageKill = AttrLabelProxy

imageMode :: AttrLabelProxy "mode"
imageMode = AttrLabelProxy

imageSizeofHeader :: AttrLabelProxy "sizeofHeader"
imageSizeofHeader = AttrLabelProxy

imageWidth :: AttrLabelProxy "width"
imageWidth = AttrLabelProxy

imageXoffset :: AttrLabelProxy "xoffset"
imageXoffset = AttrLabelProxy

imageXres :: AttrLabelProxy "xres"
imageXres = AttrLabelProxy

imageYoffset :: AttrLabelProxy "yoffset"
imageYoffset = AttrLabelProxy

imageYres :: AttrLabelProxy "yres"
imageYres = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Image = ImageSignalList
type ImageSignalList = ('[ '("close", Vips.Object.ObjectCloseSignalInfo), '("eval", ImageEvalSignalInfo), '("invalidate", ImageInvalidateSignalInfo), '("minimise", ImageMinimiseSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("postbuild", Vips.Object.ObjectPostbuildSignalInfo), '("postclose", Vips.Object.ObjectPostcloseSignalInfo), '("posteval", ImagePostevalSignalInfo), '("preclose", Vips.Object.ObjectPrecloseSignalInfo), '("preeval", ImagePreevalSignalInfo), '("written", ImageWrittenSignalInfo)] :: [(Symbol, *)])

#endif

-- method Image::matrix_from_array
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "array"
--           , argType = TCArray False (-1) 3 (TBasicType TDouble)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "array of elements" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of elements" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt64
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "number of elements" , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_matrix_from_array" vips_image_matrix_from_array :: 
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    Ptr CDouble ->                          -- array : TCArray False (-1) 3 (TBasicType TDouble)
    Word64 ->                               -- size : TBasicType TUInt64
    IO (Ptr Image)

-- | A renamed 'GI.Vips.Objects.Image.imageNewMatrixFromArray'. Some gobject bindings do not
-- like more than one _new method.
imageMatrixFromArray ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@width@/: image width
    -> Int32
    -- ^ /@height@/: image height
    -> [Double]
    -- ^ /@array@/: array of elements
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageMatrixFromArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> [Double] -> m Image
imageMatrixFromArray Int32
width Int32
height [Double]
array = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
array
    Ptr CDouble
array' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
array
    Ptr Image
result <- Int32 -> Int32 -> Ptr CDouble -> Word64 -> IO (Ptr Image)
vips_image_matrix_from_array Int32
width Int32
height Ptr CDouble
array' Word64
size
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageMatrixFromArray" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
array'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::memory
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_memory" vips_image_memory :: 
    IO (Ptr Image)

-- | A renamed 'GI.Vips.Objects.Image.imageNewMemory' ... Some gobject binding systems do not
-- like more than one @/_new()/@ method.
-- 
-- See also: 'GI.Vips.Objects.Image.imageNewMemory'.
imageMemory ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageMemory :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Image
imageMemory  = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
result <- IO (Ptr Image)
vips_image_memory
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageMemory" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new" vips_image_new :: 
    IO (Ptr Image)

-- | 'GI.Vips.Objects.Image.imageNew' creates a new, empty t'GI.Vips.Objects.Image.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
-- 'GI.Vips.Objects.Image.imageImageWriteLine'. Write a whole image to another image with
-- 'GI.Vips.Objects.Image.imageImageWrite'.
imageNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Image
imageNew  = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
result <- IO (Ptr Image)
vips_image_new
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNew" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_file_RW
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "filename"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "filename to open" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_from_file_RW" vips_image_new_from_file_RW :: 
    CString ->                              -- filename : TBasicType TUTF8
    IO (Ptr 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()/@.
imageNewFromFileRW ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@filename@/: filename to open
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewFromFileRW :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Image
imageNewFromFileRW Text
filename = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    CString
filename' <- Text -> IO CString
textToCString Text
filename
    Ptr Image
result <- CString -> IO (Ptr Image)
vips_image_new_from_file_RW CString
filename'
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromFileRW" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_file_raw
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "filename"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "filename to open" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "xsize"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ysize"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bands"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image bands (or bytes per pixel)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "bytes to skip at start of file"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_from_file_raw" vips_image_new_from_file_raw :: 
    CString ->                              -- filename : TBasicType TUTF8
    Int32 ->                                -- xsize : TBasicType TInt
    Int32 ->                                -- ysize : TBasicType TInt
    Int32 ->                                -- bands : TBasicType TInt
    Word64 ->                               -- offset : TBasicType TUInt64
    IO (Ptr Image)

-- | This function maps the named file and returns a t'GI.Vips.Objects.Image.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()/@.
imageNewFromFileRaw ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@filename@/: filename to open
    -> Int32
    -- ^ /@xsize@/: image width
    -> Int32
    -- ^ /@ysize@/: image height
    -> Int32
    -- ^ /@bands@/: image bands (or bytes per pixel)
    -> Word64
    -- ^ /@offset@/: bytes to skip at start of file
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewFromFileRaw :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Int32 -> Int32 -> Int32 -> Word64 -> m Image
imageNewFromFileRaw Text
filename Int32
xsize Int32
ysize Int32
bands Word64
offset = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    CString
filename' <- Text -> IO CString
textToCString Text
filename
    Ptr Image
result <- CString -> Int32 -> Int32 -> Int32 -> Word64 -> IO (Ptr Image)
vips_image_new_from_file_raw CString
filename' Int32
xsize Int32
ysize Int32
bands Word64
offset
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromFileRaw" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_image
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to copy" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "c"
--           , argType = TCArray False (-1) 2 (TBasicType TDouble)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "array of constants" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of constants"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "n"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "number of constants"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_from_image" vips_image_new_from_image :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr CDouble ->                          -- c : TCArray False (-1) 2 (TBasicType TDouble)
    Int32 ->                                -- n : TBasicType TInt
    IO (Ptr 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: 'GI.Vips.Objects.Image.imageNewFromImage1'
imageNewFromImage ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to copy
    -> [Double]
    -- ^ /@c@/: array of constants
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewFromImage :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> [Double] -> m Image
imageNewFromImage a
image [Double]
c = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    let n :: Int32
n = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
c
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr CDouble
c' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
c
    Ptr Image
result <- Ptr Image -> Ptr CDouble -> Int32 -> IO (Ptr Image)
vips_image_new_from_image Ptr Image
image' Ptr CDouble
c' Int32
n
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromImage" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
c'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_image1
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to copy" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "c"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "constants" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_from_image1" vips_image_new_from_image1 :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CDouble ->                              -- c : TBasicType TDouble
    IO (Ptr 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: 'GI.Vips.Objects.Image.imageNewFromImage'
imageNewFromImage1 ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to copy
    -> Double
    -- ^ /@c@/: constants
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewFromImage1 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Double -> m Image
imageNewFromImage1 a
image Double
c = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    let c' :: CDouble
c' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
c
    Ptr Image
result <- Ptr Image -> CDouble -> IO (Ptr Image)
vips_image_new_from_image1 Ptr Image
image' CDouble
c'
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromImage1" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_memory
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "data"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "start of memory area"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "length of memory area"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bands"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image bands (or bytes per pixel)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "format"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "BandFormat" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image format" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt64
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "length of memory area"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_from_memory" vips_image_new_from_memory :: 
    Ptr Word8 ->                            -- data : TCArray False (-1) 1 (TBasicType TUInt8)
    Word64 ->                               -- size : TBasicType TUInt64
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    Int32 ->                                -- bands : TBasicType TInt
    CInt ->                                 -- format : TInterface (Name {namespace = "Vips", name = "BandFormat"})
    IO (Ptr Image)

-- | This function wraps a t'GI.Vips.Objects.Image.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 [Object::close]("GI.Vips.Objects.Object#g:signal: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 'GI.Vips.Objects.Image.imageNewFromMemoryCopy' instead if you are
-- at all unsure.
-- 
-- Use @/vips_copy()/@ to set other image properties.
-- 
-- See also: 'GI.Vips.Objects.Image.imageNew', 'GI.Vips.Objects.Image.imageImageWriteToMemory',
-- 'GI.Vips.Objects.Image.imageNewFromMemoryCopy'.
imageNewFromMemory ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -- ^ /@data@/: start of memory area
    -> Int32
    -- ^ /@width@/: image width
    -> Int32
    -- ^ /@height@/: image height
    -> Int32
    -- ^ /@bands@/: image bands (or bytes per pixel)
    -> Vips.Enums.BandFormat
    -- ^ /@format@/: image format
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewFromMemory :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ByteString -> Int32 -> Int32 -> Int32 -> BandFormat -> m Image
imageNewFromMemory ByteString
data_ Int32
width Int32
height Int32
bands BandFormat
format = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
data_
    Ptr Word8
data_' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
data_
    let format' :: CInt
format' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BandFormat -> Int) -> BandFormat -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BandFormat -> Int
forall a. Enum a => a -> Int
fromEnum) BandFormat
format
    Ptr Image
result <- Ptr Word8
-> Word64 -> Int32 -> Int32 -> Int32 -> CInt -> IO (Ptr Image)
vips_image_new_from_memory Ptr Word8
data_' Word64
size Int32
width Int32
height Int32
bands CInt
format'
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromMemory" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
data_'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_from_memory_copy
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "data"
--           , argType = TCArray False (-1) 1 (TBasicType TUInt8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "start of memory area"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "length of memory area"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bands"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image bands (or bytes per pixel)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "format"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "BandFormat" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image format" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt64
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "length of memory area"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_from_memory_copy" vips_image_new_from_memory_copy :: 
    Ptr Word8 ->                            -- data : TCArray False (-1) 1 (TBasicType TUInt8)
    Word64 ->                               -- size : TBasicType TUInt64
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    Int32 ->                                -- bands : TBasicType TInt
    CInt ->                                 -- format : TInterface (Name {namespace = "Vips", name = "BandFormat"})
    IO (Ptr Image)

-- | Like 'GI.Vips.Objects.Image.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: 'GI.Vips.Objects.Image.imageNewFromMemory'.
imageNewFromMemoryCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    ByteString
    -- ^ /@data@/: start of memory area
    -> Int32
    -- ^ /@width@/: image width
    -> Int32
    -- ^ /@height@/: image height
    -> Int32
    -- ^ /@bands@/: image bands (or bytes per pixel)
    -> Vips.Enums.BandFormat
    -- ^ /@format@/: image format
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewFromMemoryCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ByteString -> Int32 -> Int32 -> Int32 -> BandFormat -> m Image
imageNewFromMemoryCopy ByteString
data_ Int32
width Int32
height Int32
bands BandFormat
format = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
data_
    Ptr Word8
data_' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
data_
    let format' :: CInt
format' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BandFormat -> Int) -> BandFormat -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BandFormat -> Int
forall a. Enum a => a -> Int
fromEnum) BandFormat
format
    Ptr Image
result <- Ptr Word8
-> Word64 -> Int32 -> Int32 -> Int32 -> CInt -> IO (Ptr Image)
vips_image_new_from_memory_copy Ptr Word8
data_' Word64
size Int32
width Int32
height Int32
bands CInt
format'
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewFromMemoryCopy" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
data_'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_matrix
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_matrix" vips_image_new_matrix :: 
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO (Ptr 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 'GI.Vips.Objects.Image.imageImageSetDouble' to set \"scale\" and \"offset\", if required.
-- 
-- See also: @/vips_image_new_matrixv()/@
imageNewMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@width@/: image width
    -> Int32
    -- ^ /@height@/: image height
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewMatrix :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> m Image
imageNewMatrix Int32
width Int32
height = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
result <- Int32 -> Int32 -> IO (Ptr Image)
vips_image_new_matrix Int32
width Int32
height
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewMatrix" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_matrix_from_array
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "array"
--           , argType = TCArray False (-1) 3 (TBasicType TDouble)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "array of elements" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of elements" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt64
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "number of elements" , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_matrix_from_array" vips_image_new_matrix_from_array :: 
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    Ptr CDouble ->                          -- array : TCArray False (-1) 3 (TBasicType TDouble)
    Word64 ->                               -- size : TBasicType TUInt64
    IO (Ptr Image)

-- | A binding-friendly version of @/vips_image_new_matrixv()/@.
imageNewMatrixFromArray ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@width@/: image width
    -> Int32
    -- ^ /@height@/: image height
    -> [Double]
    -- ^ /@array@/: array of elements
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewMatrixFromArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> [Double] -> m Image
imageNewMatrixFromArray Int32
width Int32
height [Double]
array = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    let size :: Word64
size = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
array
    Ptr CDouble
array' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
array
    Ptr Image
result <- Int32 -> Int32 -> Ptr CDouble -> Word64 -> IO (Ptr Image)
vips_image_new_matrix_from_array Int32
width Int32
height Ptr CDouble
array' Word64
size
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewMatrixFromArray" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
array'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_memory
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_memory" vips_image_new_memory :: 
    IO (Ptr Image)

-- | 'GI.Vips.Objects.Image.imageNewMemory' creates a new t'GI.Vips.Objects.Image.Image' which, when written to, will
-- create a memory image.
-- 
-- See also: 'GI.Vips.Objects.Image.imageNew'.
imageNewMemory ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewMemory :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Image
imageNewMemory  = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
result <- IO (Ptr Image)
vips_image_new_memory
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewMemory" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::new_temp_file
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "format"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "format of file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_new_temp_file" vips_image_new_temp_file :: 
    CString ->                              -- format : TBasicType TUTF8
    IO (Ptr Image)

-- | Make a t'GI.Vips.Objects.Image.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 \"&percnt;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: 'GI.Vips.Objects.Image.imageNew'.
imageNewTempFile ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@format@/: format of file
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageNewTempFile :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Image
imageNewTempFile Text
format = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    CString
format' <- Text -> IO CString
textToCString Text
format
    Ptr Image
result <- CString -> IO (Ptr Image)
vips_image_new_temp_file CString
format'
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageNewTempFile" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
format'
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Image::autorot_remove_angle
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to remove orientation from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_autorot_remove_angle" vips_autorot_remove_angle :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO ()

-- | Remove the orientation tag on /@image@/. Also remove any exif orientation tags.
-- You must @/vips_copy()/@ the image before calling this function since it
-- modifies metadata.
imageAutorotRemoveAngle ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to remove orientation from
    -> m ()
imageAutorotRemoveAngle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageAutorotRemoveAngle a
image = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr Image -> IO ()
vips_autorot_remove_angle Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageAutorotRemoveAngleMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageAutorotRemoveAngleMethodInfo a signature where
    overloadedMethod = imageAutorotRemoveAngle

instance O.OverloadedMethodInfo ImageAutorotRemoveAngleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageAutorotRemoveAngle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageAutorotRemoveAngle"
        })


#endif

-- method Image::foreign_load_invalidate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to invalidate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_foreign_load_invalidate" vips_foreign_load_invalidate :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO ()

-- | 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.
imageForeignLoadInvalidate ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to invalidate
    -> m ()
imageForeignLoadInvalidate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageForeignLoadInvalidate a
image = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr Image -> IO ()
vips_foreign_load_invalidate Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageForeignLoadInvalidateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageForeignLoadInvalidateMethodInfo a signature where
    overloadedMethod = imageForeignLoadInvalidate

instance O.OverloadedMethodInfo ImageForeignLoadInvalidateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageForeignLoadInvalidate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageForeignLoadInvalidate"
        })


#endif

-- method Image::free_buffer
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the image that contains the buffer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buffer"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the orignal buffer that was stolen"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_free_buffer" vips_image_free_buffer :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr () ->                               -- buffer : TBasicType TPtr
    IO ()

-- | Free the externally allocated buffer found in the input image. This function
-- is intended to be used with g_signal_connect.
imageFreeBuffer ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: the image that contains the buffer
    -> Ptr ()
    -- ^ /@buffer@/: the orignal buffer that was stolen
    -> m ()
imageFreeBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Ptr () -> m ()
imageFreeBuffer a
image Ptr ()
buffer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    C_ImageInvalidateCallback
vips_image_free_buffer Ptr Image
image' Ptr ()
buffer
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageFreeBufferMethodInfo
instance (signature ~ (Ptr () -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageFreeBufferMethodInfo a signature where
    overloadedMethod = imageFreeBuffer

instance O.OverloadedMethodInfo ImageFreeBufferMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageFreeBuffer",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageFreeBuffer"
        })


#endif

-- method Image::icc_ac2rc
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "in"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "input image" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "output image" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "profile_filename"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "use this profile" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_icc_ac2rc" vips_icc_ac2rc :: 
    Ptr Image ->                            -- in : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr (Ptr Image) ->                      -- out : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- profile_filename : TBasicType TUTF8
    IO Int32

-- | Transform an image from absolute to relative colorimetry using the
-- MediaWhitePoint stored in the ICC profile.
-- 
-- See also: @/vips_icc_transform()/@, @/vips_icc_import()/@.
imageIccAc2rc ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@in@/: input image
    -> T.Text
    -- ^ /@profileFilename@/: use this profile
    -> m ((Int32, Image))
    -- ^ __Returns:__ 0 on success, -1 on error.
imageIccAc2rc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m (Int32, Image)
imageIccAc2rc a
in_ Text
profileFilename = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
    Ptr (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
    CString
profileFilename' <- Text -> IO CString
textToCString Text
profileFilename
    Int32
result <- Ptr Image -> Ptr (Ptr Image) -> CString -> IO Int32
vips_icc_ac2rc Ptr Image
in_' Ptr (Ptr Image)
out CString
profileFilename'
    Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
    Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
    Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
profileFilename'
    (Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')

#if defined(ENABLE_OVERLOADING)
data ImageIccAc2rcMethodInfo
instance (signature ~ (T.Text -> m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageIccAc2rcMethodInfo a signature where
    overloadedMethod = imageIccAc2rc

instance O.OverloadedMethodInfo ImageIccAc2rcMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageIccAc2rc",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageIccAc2rc"
        })


#endif

-- method Image::image_copy_memory
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to copy to a memory buffer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Image" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_copy_memory" vips_image_copy_memory :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO (Ptr 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 'GI.Vips.Objects.Image.imageImageWioInput'.
-- 
-- If you are sure that /@image@/ is not shared with another thread (perhaps you
-- have made it yourself), use 'GI.Vips.Objects.Image.imageImageWioInput' instead.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageWioInput'.
imageImageCopyMemory ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to copy to a memory buffer
    -> m Image
    -- ^ __Returns:__ the new t'GI.Vips.Objects.Image.Image', or 'P.Nothing' on error.
imageImageCopyMemory :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Image
imageImageCopyMemory a
image = IO Image -> m Image
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Image -> m Image) -> IO Image -> m Image
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr Image
result <- Ptr Image -> IO (Ptr Image)
vips_image_copy_memory Ptr Image
image'
    Text -> Ptr Image -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageCopyMemory" Ptr Image
result
    Image
result' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Image -> IO Image
forall (m :: * -> *) a. Monad m => a -> m a
return Image
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageCopyMemoryMethodInfo
instance (signature ~ (m Image), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageCopyMemoryMethodInfo a signature where
    overloadedMethod = imageImageCopyMemory

instance O.OverloadedMethodInfo ImageImageCopyMemoryMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageCopyMemory",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageCopyMemory"
        })


#endif

-- method Image::image_decode
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "in"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to decode" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "write to this image"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_decode" vips_image_decode :: 
    Ptr Image ->                            -- in : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr (Ptr Image) ->                      -- out : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | 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: 'GI.Vips.Objects.Image.imageImageEncode', @/vips_LabQ2Lab()/@, @/vips_rad2float()/@.
imageImageDecode ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@in@/: image to decode
    -> m ((Int32, Image))
    -- ^ __Returns:__ 0 on success, or -1 on error.
imageImageDecode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Int32, Image)
imageImageDecode a
in_ = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
    Ptr (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
    Int32
result <- Ptr Image -> Ptr (Ptr Image) -> IO Int32
vips_image_decode Ptr Image
in_' Ptr (Ptr Image)
out
    Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
    Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
    Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
    (Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')

#if defined(ENABLE_OVERLOADING)
data ImageImageDecodeMethodInfo
instance (signature ~ (m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageDecodeMethodInfo a signature where
    overloadedMethod = imageImageDecode

instance O.OverloadedMethodInfo ImageImageDecodeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageDecode",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageDecode"
        })


#endif

-- method Image::image_decode_predict
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "in"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to decode" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bands"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "predict bands here" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "format"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "BandFormat" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "predict format here"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_decode_predict" vips_image_decode_predict :: 
    Ptr Image ->                            -- in : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr Int32 ->                            -- bands : TBasicType TInt
    Ptr CInt ->                             -- format : TInterface (Name {namespace = "Vips", name = "BandFormat"})
    IO Int32

-- | We often need to know what an image will decode to without actually
-- decoding it, for example, in arg checking.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageDecode'.
imageImageDecodePredict ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@in@/: image to decode
    -> m ((Int32, Int32, Vips.Enums.BandFormat))
imageImageDecodePredict :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Int32, Int32, BandFormat)
imageImageDecodePredict a
in_ = IO (Int32, Int32, BandFormat) -> m (Int32, Int32, BandFormat)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, BandFormat) -> m (Int32, Int32, BandFormat))
-> IO (Int32, Int32, BandFormat) -> m (Int32, Int32, BandFormat)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
    Ptr Int32
bands <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr CInt
format <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    Int32
result <- Ptr Image -> Ptr Int32 -> Ptr CInt -> IO Int32
vips_image_decode_predict Ptr Image
in_' Ptr Int32
bands Ptr CInt
format
    Int32
bands' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
bands
    CInt
format' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
format
    let format'' :: BandFormat
format'' = (Int -> BandFormat
forall a. Enum a => Int -> a
toEnum (Int -> BandFormat) -> (CInt -> Int) -> CInt -> BandFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
format'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
bands
    Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
format
    (Int32, Int32, BandFormat) -> IO (Int32, Int32, BandFormat)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
bands', BandFormat
format'')

#if defined(ENABLE_OVERLOADING)
data ImageImageDecodePredictMethodInfo
instance (signature ~ (m ((Int32, Int32, Vips.Enums.BandFormat))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageDecodePredictMethodInfo a signature where
    overloadedMethod = imageImageDecodePredict

instance O.OverloadedMethodInfo ImageImageDecodePredictMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageDecodePredict",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageDecodePredict"
        })


#endif

-- method Image::image_encode
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "in"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to encode" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "write to this image"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "coding"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Coding" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "coding to apply" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_encode" vips_image_encode :: 
    Ptr Image ->                            -- in : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr (Ptr Image) ->                      -- out : TInterface (Name {namespace = "Vips", name = "Image"})
    CInt ->                                 -- coding : TInterface (Name {namespace = "Vips", name = "Coding"})
    IO Int32

-- | A convenience function to pack to a coding. The inverse of
-- 'GI.Vips.Objects.Image.imageImageDecode'.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageDecode'.
imageImageEncode ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@in@/: image to encode
    -> Vips.Enums.Coding
    -- ^ /@coding@/: coding to apply
    -> m ((Int32, Image))
    -- ^ __Returns:__ 0 on success, or -1 on error.
imageImageEncode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Coding -> m (Int32, Image)
imageImageEncode a
in_ Coding
coding = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
    Ptr (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
    let coding' :: CInt
coding' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Coding -> Int) -> Coding -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Coding -> Int
forall a. Enum a => a -> Int
fromEnum) Coding
coding
    Int32
result <- Ptr Image -> Ptr (Ptr Image) -> CInt -> IO Int32
vips_image_encode Ptr Image
in_' Ptr (Ptr Image)
out CInt
coding'
    Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
    Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
    Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
    (Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')

#if defined(ENABLE_OVERLOADING)
data ImageImageEncodeMethodInfo
instance (signature ~ (Vips.Enums.Coding -> m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageEncodeMethodInfo a signature where
    overloadedMethod = imageImageEncode

instance O.OverloadedMethodInfo ImageImageEncodeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageEncode",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageEncode"
        })


#endif

-- method Image::image_get
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the field from from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name to fetch" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value_copy"
--           , argType = TGValue
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the %GValue is copied into this"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : True
-- XXX return value ignored, but it is not a boolean.
--     This may be a memory leak?

foreign import ccall "vips_image_get" vips_image_get :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr GValue ->                           -- value_copy : TGValue
    IO Int32

-- | 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 'GI.Vips.Objects.Image.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
-- 'GI.Vips.Objects.Image.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: 'GI.Vips.Objects.Image.imageImageGetTypeof', 'GI.Vips.Objects.Image.imageImageGetDouble'.
imageImageGet ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the field from from
    -> T.Text
    -- ^ /@name@/: the name to fetch
    -> m (GValue)
imageImageGet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m GValue
imageImageGet a
image Text
name = IO GValue -> m GValue
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr GValue
valueCopy <- Int -> IO (Ptr GValue)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
24 :: IO (Ptr GValue)
    Int32
_ <- Ptr Image -> CString -> Ptr GValue -> IO Int32
vips_image_get Ptr Image
image' CString
name' Ptr GValue
valueCopy
    GValue
valueCopy' <- Ptr GValue -> IO GValue
B.GValue.wrapGValuePtr Ptr GValue
valueCopy
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
valueCopy'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetMethodInfo
instance (signature ~ (T.Text -> m (GValue)), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetMethodInfo a signature where
    overloadedMethod = imageImageGet

instance O.OverloadedMethodInfo ImageImageGetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGet"
        })


#endif

-- method Image::image_get_area
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the metadata from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return metadata value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_area" vips_image_get_area :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr (Ptr ()) ->                         -- data : TBasicType TPtr
    IO Int32

-- | Gets /@data@/ from /@image@/ under the name /@name@/. A convenience
-- function over 'GI.Vips.Objects.Image.imageImageGet'. Use 'GI.Vips.Objects.Image.imageImageGetTypeof' to test for
-- the existence of a piece of metadata.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageSetArea', 'GI.Vips.Objects.Image.imageImageGet',
-- 'GI.Vips.Objects.Image.imageImageGetTypeof'
imageImageGetArea ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the metadata from
    -> T.Text
    -- ^ /@name@/: metadata name
    -> m ((Int32, Ptr ()))
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetArea :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m (Int32, Ptr ())
imageImageGetArea a
image Text
name = IO (Int32, Ptr ()) -> m (Int32, Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Ptr ()) -> m (Int32, Ptr ()))
-> IO (Int32, Ptr ()) -> m (Int32, Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr (Ptr ())
data_ <- IO (Ptr (Ptr ()))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr ()))
    Int32
result <- Ptr Image -> CString -> Ptr (Ptr ()) -> IO Int32
vips_image_get_area Ptr Image
image' CString
name' Ptr (Ptr ())
data_
    Ptr ()
data_' <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ())
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Ptr (Ptr ()) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ())
data_
    (Int32, Ptr ()) -> IO (Int32, Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Ptr ()
data_')

#if defined(ENABLE_OVERLOADING)
data ImageImageGetAreaMethodInfo
instance (signature ~ (T.Text -> m ((Int32, Ptr ()))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetAreaMethodInfo a signature where
    overloadedMethod = imageImageGetArea

instance O.OverloadedMethodInfo ImageImageGetAreaMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetArea",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetArea"
        })


#endif

-- method Image::image_get_array_double
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the metadata from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return pointer to array"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return the number of elements here, optionally"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_array_double" vips_image_get_array_double :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    CDouble ->                              -- out : TBasicType TDouble
    Int32 ->                                -- n : TBasicType TInt
    IO Int32

-- | 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 'GI.Vips.Objects.Image.imageImageGetTypeof' to test for the
-- existence of a piece of metadata.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageSetImage'
imageImageGetArrayDouble ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the metadata from
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Double
    -- ^ /@out@/: return pointer to array
    -> Int32
    -- ^ /@n@/: return the number of elements here, optionally
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetArrayDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Double -> Int32 -> m Int32
imageImageGetArrayDouble a
image Text
name Double
out Int32
n = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    let out' :: CDouble
out' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
out
    Int32
result <- Ptr Image -> CString -> CDouble -> Int32 -> IO Int32
vips_image_get_array_double Ptr Image
image' CString
name' CDouble
out' Int32
n
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetArrayDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> Int32 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetArrayDoubleMethodInfo a signature where
    overloadedMethod = imageImageGetArrayDouble

instance O.OverloadedMethodInfo ImageImageGetArrayDoubleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetArrayDouble",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetArrayDouble"
        })


#endif

-- method Image::image_get_array_int
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the metadata from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return pointer to array"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return the number of elements here, optionally"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_array_int" vips_image_get_array_int :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Int32 ->                                -- out : TBasicType TInt
    Int32 ->                                -- n : TBasicType TInt
    IO Int32

-- | 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 'GI.Vips.Objects.Image.imageImageGetTypeof' to test for the
-- existence of a piece of metadata.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageSetImage'
imageImageGetArrayInt ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the metadata from
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Int32
    -- ^ /@out@/: return pointer to array
    -> Int32
    -- ^ /@n@/: return the number of elements here, optionally
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetArrayInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Int32 -> Int32 -> m Int32
imageImageGetArrayInt a
image Text
name Int32
out Int32
n = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Int32
result <- Ptr Image -> CString -> Int32 -> Int32 -> IO Int32
vips_image_get_array_int Ptr Image
image' CString
name' Int32
out Int32
n
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetArrayIntMethodInfo
instance (signature ~ (T.Text -> Int32 -> Int32 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetArrayIntMethodInfo a signature where
    overloadedMethod = imageImageGetArrayInt

instance O.OverloadedMethodInfo ImageImageGetArrayIntMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetArrayInt",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetArrayInt"
        })


#endif

-- method Image::image_get_as_string
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the header field from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "field name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return field value as string"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_as_string" vips_image_get_as_string :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- out : TBasicType TUTF8
    IO Int32

-- | 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 'GI.GLib.Functions.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: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageGetTypeof', @/vips_buf_appendgv()/@.
imageImageGetAsString ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the header field from
    -> T.Text
    -- ^ /@name@/: field name
    -> T.Text
    -- ^ /@out@/: return field value as string
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetAsString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Text -> m Int32
imageImageGetAsString a
image Text
name Text
out = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
out' <- Text -> IO CString
textToCString Text
out
    Int32
result <- Ptr Image -> CString -> CString -> IO Int32
vips_image_get_as_string Ptr Image
image' CString
name' CString
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetAsStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetAsStringMethodInfo a signature where
    overloadedMethod = imageImageGetAsString

instance O.OverloadedMethodInfo ImageImageGetAsStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetAsString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetAsString"
        })


#endif

-- method Image::image_get_bands
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_bands" vips_image_get_bands :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | /No description available in the introspection data./
imageImageGetBands ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the number of bands (channels) in the image.
imageImageGetBands :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetBands a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_bands Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetBandsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetBandsMethodInfo a signature where
    overloadedMethod = imageImageGetBands

instance O.OverloadedMethodInfo ImageImageGetBandsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetBands",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetBands"
        })


#endif

-- method Image::image_get_blob
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the metadata from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "pointer to area of memory"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return the blob length here, optionally"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_blob" vips_image_get_blob :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr () ->                               -- data : TBasicType TPtr
    Word64 ->                               -- length : TBasicType TUInt64
    IO Int32

-- | Gets /@blob@/ from /@image@/ under the name /@name@/, optionally returns its length in
-- /@length@/. A convenience
-- function over 'GI.Vips.Objects.Image.imageImageGet'. Use 'GI.Vips.Objects.Image.imageImageGetTypeof' to test for the
-- existence
-- of a piece of metadata.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageGetTypeof', 'GI.Vips.Structs.Blob.blobGet',
imageImageGetBlob ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the metadata from
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Ptr ()
    -- ^ /@data@/: pointer to area of memory
    -> Word64
    -- ^ /@length@/: return the blob length here, optionally
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetBlob :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Ptr () -> Word64 -> m Int32
imageImageGetBlob a
image Text
name Ptr ()
data_ Word64
length_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Int32
result <- Ptr Image -> CString -> Ptr () -> Word64 -> IO Int32
vips_image_get_blob Ptr Image
image' CString
name' Ptr ()
data_ Word64
length_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetBlobMethodInfo
instance (signature ~ (T.Text -> Ptr () -> Word64 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetBlobMethodInfo a signature where
    overloadedMethod = imageImageGetBlob

instance O.OverloadedMethodInfo ImageImageGetBlobMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetBlob",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetBlob"
        })


#endif

-- method Image::image_get_coding
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "Coding" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_coding" vips_image_get_coding :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | /No description available in the introspection data./
imageImageGetCoding ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Vips.Enums.Coding
    -- ^ __Returns:__ the image coding
imageImageGetCoding :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Coding
imageImageGetCoding a
image = IO Coding -> m Coding
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Coding -> m Coding) -> IO Coding -> m Coding
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_get_coding Ptr Image
image'
    let result' :: Coding
result' = (Int -> Coding
forall a. Enum a => Int -> a
toEnum (Int -> Coding) -> (CInt -> Int) -> CInt -> Coding
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Coding -> IO Coding
forall (m :: * -> *) a. Monad m => a -> m a
return Coding
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetCodingMethodInfo
instance (signature ~ (m Vips.Enums.Coding), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetCodingMethodInfo a signature where
    overloadedMethod = imageImageGetCoding

instance O.OverloadedMethodInfo ImageImageGetCodingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetCoding",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetCoding"
        })


#endif

-- method Image::image_get_data
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get data for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_data" vips_image_get_data :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO (Ptr ())

-- | 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: 'GI.Vips.Objects.Image.imageImageWioInput', 'GI.Vips.Objects.Image.imageImageCopyMemory'.
imageImageGetData ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get data for
    -> m (Ptr ())
    -- ^ __Returns:__ a pointer to pixel data, if possible.
imageImageGetData :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Ptr ())
imageImageGetData a
image = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr ()
result <- Ptr Image -> IO (Ptr ())
vips_image_get_data Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetDataMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetDataMethodInfo a signature where
    overloadedMethod = imageImageGetData

instance O.OverloadedMethodInfo ImageImageGetDataMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetData",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetData"
        })


#endif

-- method Image::image_get_double
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the header field from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "field name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return field value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_double" vips_image_get_double :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    CDouble ->                              -- out : TBasicType TDouble
    IO Int32

-- | Gets /@out@/ from /@im@/ under the name /@name@/.
-- The value will be transformed into
-- a double, if possible.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageGetTypeof'
imageImageGetDouble ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the header field from
    -> T.Text
    -- ^ /@name@/: field name
    -> Double
    -- ^ /@out@/: return field value
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Double -> m Int32
imageImageGetDouble a
image Text
name Double
out = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    let out' :: CDouble
out' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
out
    Int32
result <- Ptr Image -> CString -> CDouble -> IO Int32
vips_image_get_double Ptr Image
image' CString
name' CDouble
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetDoubleMethodInfo a signature where
    overloadedMethod = imageImageGetDouble

instance O.OverloadedMethodInfo ImageImageGetDoubleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetDouble",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetDouble"
        })


#endif

-- method Image::image_get_fields
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get fields from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_fields" vips_image_get_fields :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO (Ptr CString)

-- | Get a 'P.Nothing'-terminated array listing all the metadata field names on /@image@/.
-- Free the return result with 'GI.GLib.Functions.strfreev'.
-- 
-- This is handy for language bindings. From C, it\'s usually more convenient to
-- use 'GI.Vips.Objects.Image.imageImageMap'.
imageImageGetFields ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get fields from
    -> m [T.Text]
    -- ^ __Returns:__ metadata fields in image, as a 'P.Nothing'-terminated
    -- array.
imageImageGetFields :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m [Text]
imageImageGetFields a
image = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr CString
result <- Ptr Image -> IO (Ptr CString)
vips_image_get_fields Ptr Image
image'
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetFields" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetFieldsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetFieldsMethodInfo a signature where
    overloadedMethod = imageImageGetFields

instance O.OverloadedMethodInfo ImageImageGetFieldsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetFields",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetFields"
        })


#endif

-- method Image::image_get_filename
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_filename" vips_image_get_filename :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CString

-- | /No description available in the introspection data./
imageImageGetFilename ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m T.Text
    -- ^ __Returns:__ the name of the file the image was loaded from, or NULL if there
    -- is no filename.
imageImageGetFilename :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Text
imageImageGetFilename a
image = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
result <- Ptr Image -> IO CString
vips_image_get_filename Ptr Image
image'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetFilename" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetFilenameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetFilenameMethodInfo a signature where
    overloadedMethod = imageImageGetFilename

instance O.OverloadedMethodInfo ImageImageGetFilenameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetFilename",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetFilename"
        })


#endif

-- method Image::image_get_format
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "BandFormat" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_format" vips_image_get_format :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | /No description available in the introspection data./
imageImageGetFormat ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Vips.Enums.BandFormat
    -- ^ __Returns:__ the format of each band element.
imageImageGetFormat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m BandFormat
imageImageGetFormat a
image = IO BandFormat -> m BandFormat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BandFormat -> m BandFormat) -> IO BandFormat -> m BandFormat
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_get_format Ptr Image
image'
    let result' :: BandFormat
result' = (Int -> BandFormat
forall a. Enum a => Int -> a
toEnum (Int -> BandFormat) -> (CInt -> Int) -> CInt -> BandFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    BandFormat -> IO BandFormat
forall (m :: * -> *) a. Monad m => a -> m a
return BandFormat
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetFormatMethodInfo
instance (signature ~ (m Vips.Enums.BandFormat), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetFormatMethodInfo a signature where
    overloadedMethod = imageImageGetFormat

instance O.OverloadedMethodInfo ImageImageGetFormatMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetFormat",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetFormat"
        })


#endif

-- method Image::image_get_height
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_height" vips_image_get_height :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | /No description available in the introspection data./
imageImageGetHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the number of pixels down the image.
imageImageGetHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetHeight a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_height Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetHeightMethodInfo a signature where
    overloadedMethod = imageImageGetHeight

instance O.OverloadedMethodInfo ImageImageGetHeightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetHeight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetHeight"
        })


#endif

-- method Image::image_get_history
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "get history from here"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_history" vips_image_get_history :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CString

-- | 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()/@.
imageImageGetHistory ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: get history from here
    -> m T.Text
    -- ^ __Returns:__ The history of /@image@/ as a C string. Do not free!
imageImageGetHistory :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Text
imageImageGetHistory a
image = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
result <- Ptr Image -> IO CString
vips_image_get_history Ptr Image
image'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetHistory" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetHistoryMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetHistoryMethodInfo a signature where
    overloadedMethod = imageImageGetHistory

instance O.OverloadedMethodInfo ImageImageGetHistoryMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetHistory",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetHistory"
        })


#endif

-- method Image::image_get_image
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the metadata from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return metadata value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_image" vips_image_get_image :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr Image ->                            -- out : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | Gets /@out@/ from /@im@/ under the name /@name@/.
-- The field must be of type
-- @/VIPS_TYPE_IMAGE/@. You must unref /@out@/ with 'GI.GObject.Objects.Object.objectUnref'.
-- 
-- Use 'GI.Vips.Objects.Image.imageImageGetTypeof' to test for the
-- existence of a piece of metadata.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageSetImage'
imageImageGetImage ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a, IsImage b) =>
    a
    -- ^ /@image@/: image to get the metadata from
    -> T.Text
    -- ^ /@name@/: metadata name
    -> b
    -- ^ /@out@/: return metadata value
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetImage :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsImage a, IsImage b) =>
a -> Text -> b -> m Int32
imageImageGetImage a
image Text
name b
out = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Image
out' <- b -> IO (Ptr Image)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
out
    Int32
result <- Ptr Image -> CString -> Ptr Image -> IO Int32
vips_image_get_image Ptr Image
image' CString
name' Ptr Image
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
out
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetImageMethodInfo
instance (signature ~ (T.Text -> b -> m Int32), MonadIO m, IsImage a, IsImage b) => O.OverloadedMethod ImageImageGetImageMethodInfo a signature where
    overloadedMethod = imageImageGetImage

instance O.OverloadedMethodInfo ImageImageGetImageMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetImage",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetImage"
        })


#endif

-- method Image::image_get_int
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the header field from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "field name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return field value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_int" vips_image_get_int :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr Int32 ->                            -- out : TBasicType TInt
    IO Int32

-- | Gets /@out@/ from /@im@/ under the name /@name@/.
-- The value will be transformed into
-- an int, if possible.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageGetTypeof'
imageImageGetInt ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the header field from
    -> T.Text
    -- ^ /@name@/: field name
    -> m ((Int32, Int32))
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m (Int32, Int32)
imageImageGetInt a
image Text
name = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Int32
out <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Int32
result <- Ptr Image -> CString -> Ptr Int32 -> IO Int32
vips_image_get_int Ptr Image
image' CString
name' Ptr Int32
out
    Int32
out' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
out
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
out
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
out')

#if defined(ENABLE_OVERLOADING)
data ImageImageGetIntMethodInfo
instance (signature ~ (T.Text -> m ((Int32, Int32))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetIntMethodInfo a signature where
    overloadedMethod = imageImageGetInt

instance O.OverloadedMethodInfo ImageImageGetIntMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetInt",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetInt"
        })


#endif

-- method Image::image_get_interpretation
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Vips" , name = "Interpretation" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_interpretation" vips_image_get_interpretation :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | Return the t'GI.Vips.Enums.Interpretation' set in the image header.
-- Use 'GI.Vips.Objects.Image.imageImageGuessInterpretation' if you want a sanity-checked value.
imageImageGetInterpretation ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Vips.Enums.Interpretation
    -- ^ __Returns:__ the t'GI.Vips.Enums.Interpretation' from the image header.
imageImageGetInterpretation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Interpretation
imageImageGetInterpretation a
image = IO Interpretation -> m Interpretation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Interpretation -> m Interpretation)
-> IO Interpretation -> m Interpretation
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_get_interpretation Ptr Image
image'
    let result' :: Interpretation
result' = (Int -> Interpretation
forall a. Enum a => Int -> a
toEnum (Int -> Interpretation) -> (CInt -> Int) -> CInt -> Interpretation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Interpretation -> IO Interpretation
forall (m :: * -> *) a. Monad m => a -> m a
return Interpretation
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetInterpretationMethodInfo
instance (signature ~ (m Vips.Enums.Interpretation), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetInterpretationMethodInfo a signature where
    overloadedMethod = imageImageGetInterpretation

instance O.OverloadedMethodInfo ImageImageGetInterpretationMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetInterpretation",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetInterpretation"
        })


#endif

-- method Image::image_get_mode
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_mode" vips_image_get_mode :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CString

-- | Image modes are things like @\"t\"@, meaning a memory buffer, and @\"p\"@
-- meaning a delayed computation.
imageImageGetMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m T.Text
    -- ^ __Returns:__ the image mode.
imageImageGetMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Text
imageImageGetMode a
image = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
result <- Ptr Image -> IO CString
vips_image_get_mode Ptr Image
image'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageGetMode" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetModeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetModeMethodInfo a signature where
    overloadedMethod = imageImageGetMode

instance O.OverloadedMethodInfo ImageImageGetModeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetMode",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetMode"
        })


#endif

-- method Image::image_get_n_pages
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_n_pages" vips_image_get_n_pages :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | Fetch and sanity-check 'GI.Vips.Constants.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@/.
imageImageGetNPages ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the number of pages in the image file
imageImageGetNPages :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetNPages a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_n_pages Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetNPagesMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetNPagesMethodInfo a signature where
    overloadedMethod = imageImageGetNPages

instance O.OverloadedMethodInfo ImageImageGetNPagesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetNPages",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetNPages"
        })


#endif

-- method Image::image_get_n_subifds
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_n_subifds" vips_image_get_n_subifds :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | Fetch and sanity-check 'GI.Vips.Constants.META_N_SUBIFDS'. Default to 0 if not present or
-- crazy.
imageImageGetNSubifds ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the number of subifds in the image file
imageImageGetNSubifds :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetNSubifds a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_n_subifds Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetNSubifdsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetNSubifdsMethodInfo a signature where
    overloadedMethod = imageImageGetNSubifds

instance O.OverloadedMethodInfo ImageImageGetNSubifdsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetNSubifds",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetNSubifds"
        })


#endif

-- method Image::image_get_offset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_offset" vips_image_get_offset :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CDouble

-- | Matrix images can have an optional @offset@ field for use by integer
-- convolution.
imageImageGetOffset ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Double
    -- ^ __Returns:__ the offset.
imageImageGetOffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetOffset a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_offset Ptr Image
image'
    let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetOffsetMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetOffsetMethodInfo a signature where
    overloadedMethod = imageImageGetOffset

instance O.OverloadedMethodInfo ImageImageGetOffsetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetOffset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetOffset"
        })


#endif

-- method Image::image_get_orientation
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_orientation" vips_image_get_orientation :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | Fetch and sanity-check 'GI.Vips.Constants.META_ORIENTATION'. Default to 1 (no rotate,
-- no flip) if not present or crazy.
imageImageGetOrientation ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the image orientation.
imageImageGetOrientation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetOrientation a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_orientation Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetOrientationMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetOrientationMethodInfo a signature where
    overloadedMethod = imageImageGetOrientation

instance O.OverloadedMethodInfo ImageImageGetOrientationMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetOrientation",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetOrientation"
        })


#endif

-- method Image::image_get_orientation_swap
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_orientation_swap" vips_image_get_orientation_swap :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | Return 'P.True' if applying the orientation would swap width and height.
imageImageGetOrientationSwap ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Bool
    -- ^ __Returns:__ if width\/height will swap
imageImageGetOrientationSwap :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageGetOrientationSwap a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_get_orientation_swap Ptr Image
image'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetOrientationSwapMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetOrientationSwapMethodInfo a signature where
    overloadedMethod = imageImageGetOrientationSwap

instance O.OverloadedMethodInfo ImageImageGetOrientationSwapMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetOrientationSwap",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetOrientationSwap"
        })


#endif

-- method Image::image_get_page_height
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_page_height" vips_image_get_page_height :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | 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.
imageImageGetPageHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the page height.
imageImageGetPageHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetPageHeight a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_page_height Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetPageHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetPageHeightMethodInfo a signature where
    overloadedMethod = imageImageGetPageHeight

instance O.OverloadedMethodInfo ImageImageGetPageHeightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetPageHeight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetPageHeight"
        })


#endif

-- method Image::image_get_scale
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_scale" vips_image_get_scale :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CDouble

-- | Matrix images can have an optional @scale@ field for use by integer
-- convolution.
imageImageGetScale ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Double
    -- ^ __Returns:__ the scale.
imageImageGetScale :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetScale a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_scale Ptr Image
image'
    let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetScaleMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetScaleMethodInfo a signature where
    overloadedMethod = imageImageGetScale

instance O.OverloadedMethodInfo ImageImageGetScaleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetScale",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetScale"
        })


#endif

-- method Image::image_get_string
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the header field from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "field name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return field value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_string" vips_image_get_string :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- out : TBasicType TUTF8
    IO Int32

-- | Gets /@out@/ from /@im@/ under the name /@name@/.
-- The field must be of type
-- G_TYPE_STRING, VIPS_TYPE_REF_STRING.
-- 
-- Do not free /@out@/.
-- 
-- Use 'GI.Vips.Objects.Image.imageImageGetAsString' to fetch any field as a string.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet', 'GI.Vips.Objects.Image.imageImageGetTypeof'
imageImageGetString ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the header field from
    -> T.Text
    -- ^ /@name@/: field name
    -> T.Text
    -- ^ /@out@/: return field value
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 otherwise.
imageImageGetString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Text -> m Int32
imageImageGetString a
image Text
name Text
out = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
out' <- Text -> IO CString
textToCString Text
out
    Int32
result <- Ptr Image -> CString -> CString -> IO Int32
vips_image_get_string Ptr Image
image' CString
name' CString
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
out'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetStringMethodInfo a signature where
    overloadedMethod = imageImageGetString

instance O.OverloadedMethodInfo ImageImageGetStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetString"
        })


#endif

-- method Image::image_get_typeof
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name to search for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_typeof" vips_image_get_typeof :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    IO CGType

-- | Read the @/GType/@ for a header field. Returns zero if there is no
-- field of that name.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGet'.
imageImageGetTypeof ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to test
    -> T.Text
    -- ^ /@name@/: the name to search for
    -> m GType
    -- ^ __Returns:__ the @/GType/@ of the field, or zero if there is no
    -- field of that name.
imageImageGetTypeof :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m GType
imageImageGetTypeof a
image Text
name = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Word64
result <- Ptr Image -> CString -> IO Word64
vips_image_get_typeof Ptr Image
image' CString
name'
    let result' :: GType
result' = Word64 -> GType
GType Word64
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetTypeofMethodInfo
instance (signature ~ (T.Text -> m GType), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetTypeofMethodInfo a signature where
    overloadedMethod = imageImageGetTypeof

instance O.OverloadedMethodInfo ImageImageGetTypeofMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetTypeof",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetTypeof"
        })


#endif

-- method Image::image_get_width
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_width" vips_image_get_width :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | /No description available in the introspection data./
imageImageGetWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the number of pixels across the image.
imageImageGetWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetWidth a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_width Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetWidthMethodInfo a signature where
    overloadedMethod = imageImageGetWidth

instance O.OverloadedMethodInfo ImageImageGetWidthMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetWidth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetWidth"
        })


#endif

-- method Image::image_get_xoffset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_xoffset" vips_image_get_xoffset :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | /No description available in the introspection data./
imageImageGetXoffset ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the horizontal position of the image origin, in pixels.
imageImageGetXoffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetXoffset a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_xoffset Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetXoffsetMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetXoffsetMethodInfo a signature where
    overloadedMethod = imageImageGetXoffset

instance O.OverloadedMethodInfo ImageImageGetXoffsetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetXoffset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetXoffset"
        })


#endif

-- method Image::image_get_xres
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_xres" vips_image_get_xres :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CDouble

-- | /No description available in the introspection data./
imageImageGetXres ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Double
    -- ^ __Returns:__ the horizontal image resolution in pixels per millimeter.
imageImageGetXres :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetXres a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_xres Ptr Image
image'
    let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetXresMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetXresMethodInfo a signature where
    overloadedMethod = imageImageGetXres

instance O.OverloadedMethodInfo ImageImageGetXresMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetXres",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetXres"
        })


#endif

-- method Image::image_get_yoffset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_yoffset" vips_image_get_yoffset :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | /No description available in the introspection data./
imageImageGetYoffset ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Int32
    -- ^ __Returns:__ the vertical position of the image origin, in pixels.
imageImageGetYoffset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageGetYoffset a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_get_yoffset Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageGetYoffsetMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetYoffsetMethodInfo a signature where
    overloadedMethod = imageImageGetYoffset

instance O.OverloadedMethodInfo ImageImageGetYoffsetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetYoffset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetYoffset"
        })


#endif

-- method Image::image_get_yres
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get from" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_get_yres" vips_image_get_yres :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CDouble

-- | /No description available in the introspection data./
imageImageGetYres ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get from
    -> m Double
    -- ^ __Returns:__ the vertical image resolution in pixels per millimeter.
imageImageGetYres :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Double
imageImageGetYres a
image = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CDouble
result <- Ptr Image -> IO CDouble
vips_image_get_yres Ptr Image
image'
    let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGetYresMethodInfo
instance (signature ~ (m Double), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGetYresMethodInfo a signature where
    overloadedMethod = imageImageGetYres

instance O.OverloadedMethodInfo ImageImageGetYresMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGetYres",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGetYres"
        })


#endif

-- method Image::image_guess_format
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to guess for" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Vips" , name = "BandFormat" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_guess_format" vips_image_guess_format :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | Return the t'GI.Vips.Enums.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.
imageImageGuessFormat ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to guess for
    -> m Vips.Enums.BandFormat
    -- ^ __Returns:__ a sensible t'GI.Vips.Enums.BandFormat' for the image.
imageImageGuessFormat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m BandFormat
imageImageGuessFormat a
image = IO BandFormat -> m BandFormat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BandFormat -> m BandFormat) -> IO BandFormat -> m BandFormat
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_guess_format Ptr Image
image'
    let result' :: BandFormat
result' = (Int -> BandFormat
forall a. Enum a => Int -> a
toEnum (Int -> BandFormat) -> (CInt -> Int) -> CInt -> BandFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    BandFormat -> IO BandFormat
forall (m :: * -> *) a. Monad m => a -> m a
return BandFormat
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGuessFormatMethodInfo
instance (signature ~ (m Vips.Enums.BandFormat), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGuessFormatMethodInfo a signature where
    overloadedMethod = imageImageGuessFormat

instance O.OverloadedMethodInfo ImageImageGuessFormatMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGuessFormat",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGuessFormat"
        })


#endif

-- method Image::image_guess_interpretation
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to guess for" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Vips" , name = "Interpretation" })
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_guess_interpretation" vips_image_guess_interpretation :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | Return the t'GI.Vips.Enums.Interpretation' for an image, guessing a sane value if
-- the set value looks crazy.
imageImageGuessInterpretation ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to guess for
    -> m Vips.Enums.Interpretation
    -- ^ __Returns:__ a sensible t'GI.Vips.Enums.Interpretation' for the image.
imageImageGuessInterpretation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Interpretation
imageImageGuessInterpretation a
image = IO Interpretation -> m Interpretation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Interpretation -> m Interpretation)
-> IO Interpretation -> m Interpretation
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_guess_interpretation Ptr Image
image'
    let result' :: Interpretation
result' = (Int -> Interpretation
forall a. Enum a => Int -> a
toEnum (Int -> Interpretation) -> (CInt -> Int) -> CInt -> Interpretation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Interpretation -> IO Interpretation
forall (m :: * -> *) a. Monad m => a -> m a
return Interpretation
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageGuessInterpretationMethodInfo
instance (signature ~ (m Vips.Enums.Interpretation), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageGuessInterpretationMethodInfo a signature where
    overloadedMethod = imageImageGuessInterpretation

instance O.OverloadedMethodInfo ImageImageGuessInterpretationMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageGuessInterpretation",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageGuessInterpretation"
        })


#endif

-- method Image::image_hasalpha
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to check" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_hasalpha" vips_image_hasalpha :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | 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 'P.True' if /@image@/ has an alpha channel.
imageImageHasalpha ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to check
    -> m Bool
imageImageHasalpha :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageHasalpha a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_hasalpha Ptr Image
image'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageHasalphaMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageHasalphaMethodInfo a signature where
    overloadedMethod = imageImageHasalpha

instance O.OverloadedMethodInfo ImageImageHasalphaMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageHasalpha",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageHasalpha"
        })


#endif

-- method Image::image_history_args
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach history line to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "program name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "argc"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of program arguments"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "argv"
--           , argType = TCArray False (-1) 2 (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "program arguments" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "argc"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "number of program arguments"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_history_args" vips_image_history_args :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Int32 ->                                -- argc : TBasicType TInt
    Ptr CString ->                          -- argv : TCArray False (-1) 2 (TBasicType TUTF8)
    IO Int32

-- | Formats the name\/argv as a single string and calls
-- @/vips_image_history_printf()/@. A
-- convenience function for command-line prorams.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetHistory'.
imageImageHistoryArgs ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach history line to
    -> T.Text
    -- ^ /@name@/: program name
    -> [T.Text]
    -- ^ /@argv@/: program arguments
    -> m Int32
    -- ^ __Returns:__ 0 on success, -1 on error.
imageImageHistoryArgs :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> [Text] -> m Int32
imageImageHistoryArgs a
image Text
name [Text]
argv = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    let argc :: Int32
argc = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Text] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Text]
argv
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr CString
argv' <- [Text] -> IO (Ptr CString)
packUTF8CArray [Text]
argv
    Int32
result <- Ptr Image -> CString -> Int32 -> Ptr CString -> IO Int32
vips_image_history_args Ptr Image
image' CString
name' Int32
argc Ptr CString
argv'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    (Int32 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Int32
argc) CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageHistoryArgsMethodInfo
instance (signature ~ (T.Text -> [T.Text] -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageHistoryArgsMethodInfo a signature where
    overloadedMethod = imageImageHistoryArgs

instance O.OverloadedMethodInfo ImageImageHistoryArgsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageHistoryArgs",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageHistoryArgs"
        })


#endif

-- method Image::image_init_fields
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to init" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "xsize"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image width" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ysize"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image height" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bands"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image bands" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "format"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "BandFormat" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "band format" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "coding"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Coding" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image coding" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "interpretation"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "Interpretation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "xres"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "horizontal resolution, pixels per millimetre"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "yres"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "vertical resolution, pixels per millimetre"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_init_fields" vips_image_init_fields :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    Int32 ->                                -- xsize : TBasicType TInt
    Int32 ->                                -- ysize : TBasicType TInt
    Int32 ->                                -- bands : TBasicType TInt
    CInt ->                                 -- format : TInterface (Name {namespace = "Vips", name = "BandFormat"})
    CInt ->                                 -- coding : TInterface (Name {namespace = "Vips", name = "Coding"})
    CInt ->                                 -- interpretation : TInterface (Name {namespace = "Vips", name = "Interpretation"})
    CDouble ->                              -- xres : TBasicType TDouble
    CDouble ->                              -- yres : TBasicType TDouble
    IO ()

-- | 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()/@.
imageImageInitFields ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to init
    -> Int32
    -- ^ /@xsize@/: image width
    -> Int32
    -- ^ /@ysize@/: image height
    -> Int32
    -- ^ /@bands@/: image bands
    -> Vips.Enums.BandFormat
    -- ^ /@format@/: band format
    -> Vips.Enums.Coding
    -- ^ /@coding@/: image coding
    -> Vips.Enums.Interpretation
    -- ^ /@interpretation@/: image type
    -> Double
    -- ^ /@xres@/: horizontal resolution, pixels per millimetre
    -> Double
    -- ^ /@yres@/: vertical resolution, pixels per millimetre
    -> m ()
imageImageInitFields :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a
-> Int32
-> Int32
-> Int32
-> BandFormat
-> Coding
-> Interpretation
-> Double
-> Double
-> m ()
imageImageInitFields a
image Int32
xsize Int32
ysize Int32
bands BandFormat
format Coding
coding Interpretation
interpretation Double
xres Double
yres = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    let format' :: CInt
format' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BandFormat -> Int) -> BandFormat -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BandFormat -> Int
forall a. Enum a => a -> Int
fromEnum) BandFormat
format
    let coding' :: CInt
coding' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Coding -> Int) -> Coding -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Coding -> Int
forall a. Enum a => a -> Int
fromEnum) Coding
coding
    let interpretation' :: CInt
interpretation' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Interpretation -> Int) -> Interpretation -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Interpretation -> Int
forall a. Enum a => a -> Int
fromEnum) Interpretation
interpretation
    let xres' :: CDouble
xres' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
xres
    let yres' :: CDouble
yres' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
yres
    Ptr Image
-> Int32
-> Int32
-> Int32
-> CInt
-> CInt
-> CInt
-> CDouble
-> CDouble
-> IO ()
vips_image_init_fields Ptr Image
image' Int32
xsize Int32
ysize Int32
bands CInt
format' CInt
coding' CInt
interpretation' CDouble
xres' CDouble
yres'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageInitFieldsMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Vips.Enums.BandFormat -> Vips.Enums.Coding -> Vips.Enums.Interpretation -> Double -> Double -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageInitFieldsMethodInfo a signature where
    overloadedMethod = imageImageInitFields

instance O.OverloadedMethodInfo ImageImageInitFieldsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageInitFields",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageInitFields"
        })


#endif

-- method Image::image_inplace
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to make read-write"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_inplace" vips_image_inplace :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | 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()/@.
-- 
-- This method is called for you by the base class of the draw operations,
-- there\'s no need to call it yourself.
-- 
-- 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()/@, 'GI.Vips.Objects.Image.imageImageWioInput'.
imageImageInplace ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to make read-write
    -> m Int32
    -- ^ __Returns:__ 0 on succeess, or -1 on error.
imageImageInplace :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageInplace a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_inplace Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageInplaceMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageInplaceMethodInfo a signature where
    overloadedMethod = imageImageInplace

instance O.OverloadedMethodInfo ImageImageInplaceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageInplace",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageInplace"
        })


#endif

-- method Image::image_invalidate_all
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#VipsImage to invalidate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_invalidate_all" vips_image_invalidate_all :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO ()

-- | 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 [Image::invalidate]("GI.Vips.Objects.Image#g:signal:invalidate") signal is emitted for all invalidated images.
-- 
-- See also: 'GI.Vips.Objects.Region.regionRegionInvalidate'.
imageImageInvalidateAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: t'GI.Vips.Objects.Image.Image' to invalidate
    -> m ()
imageImageInvalidateAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageImageInvalidateAll a
image = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr Image -> IO ()
vips_image_invalidate_all Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageInvalidateAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageInvalidateAllMethodInfo a signature where
    overloadedMethod = imageImageInvalidateAll

instance O.OverloadedMethodInfo ImageImageInvalidateAllMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageInvalidateAll",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageInvalidateAll"
        })


#endif

-- method Image::image_isMSBfirst
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_isMSBfirst" vips_image_isMSBfirst :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | Return 'P.True' if /@image@/ is in most-significant-
-- byte first form. This is the byte order used on the SPARC
-- architecture and others.
imageImageIsMSBfirst ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to test
    -> m Bool
imageImageIsMSBfirst :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIsMSBfirst a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_isMSBfirst Ptr Image
image'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageIsMSBfirstMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIsMSBfirstMethodInfo a signature where
    overloadedMethod = imageImageIsMSBfirst

instance O.OverloadedMethodInfo ImageImageIsMSBfirstMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIsMSBfirst",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIsMSBfirst"
        })


#endif

-- method Image::image_is_sequential
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#VipsImage to minimise"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_is_sequential" vips_image_is_sequential :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | 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.
imageImageIsSequential ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: t'GI.Vips.Objects.Image.Image' to minimise
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@image@/ is in sequential mode.
imageImageIsSequential :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIsSequential a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_is_sequential Ptr Image
image'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageIsSequentialMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIsSequentialMethodInfo a signature where
    overloadedMethod = imageImageIsSequential

instance O.OverloadedMethodInfo ImageImageIsSequentialMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIsSequential",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIsSequential"
        })


#endif

-- method Image::image_isfile
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_isfile" vips_image_isfile :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | Return 'P.True' if /@image@/ represents a file on disc in some way.
imageImageIsfile ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to test
    -> m Bool
imageImageIsfile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIsfile a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_isfile Ptr Image
image'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageIsfileMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIsfileMethodInfo a signature where
    overloadedMethod = imageImageIsfile

instance O.OverloadedMethodInfo ImageImageIsfileMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIsfile",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIsfile"
        })


#endif

-- method Image::image_iskilled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_iskilled" vips_image_iskilled :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | If /@image@/ has been killed (see 'GI.Vips.Objects.Image.imageImageSetKill'), set an error message,
-- clear the t'GI.Vips.Objects.Image.Image'.@/kill/@ flag and return 'P.True'. Otherwise return 'P.False'.
-- 
-- Handy for loops which need to run sets of threads which can fail.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageSetKill'.
imageImageIskilled ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to test
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@image@/ has been killed.
imageImageIskilled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIskilled a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_iskilled Ptr Image
image'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageIskilledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIskilledMethodInfo a signature where
    overloadedMethod = imageImageIskilled

instance O.OverloadedMethodInfo ImageImageIskilledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIskilled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIskilled"
        })


#endif

-- method Image::image_ispartial
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_ispartial" vips_image_ispartial :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO CInt

-- | Return 'P.True' if /@im@/ represents a partial image (a delayed calculation).
imageImageIspartial ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to test
    -> m Bool
imageImageIspartial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Bool
imageImageIspartial a
image = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CInt
result <- Ptr Image -> IO CInt
vips_image_ispartial Ptr Image
image'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageIspartialMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageIspartialMethodInfo a signature where
    overloadedMethod = imageImageIspartial

instance O.OverloadedMethodInfo ImageImageIspartialMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageIspartial",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageIspartial"
        })


#endif

-- XXX Could not generate method Image::image_map
{-  Bad introspection data: Closure not found! 
    Closure: 1
    c2cm: fromList []
    callable: Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = True
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just "%NULL on success, the failing pointer otherwise."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "image"
              , argType = TInterface Name { namespace = "Vips" , name = "Image" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "image to map over" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "fn"
              , argType =
                  TInterface Name { namespace = "Vips" , name = "ImageMapFn" }
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "function to call for each header field"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeCall
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "a"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data for function"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = 1
              , argDestroy = -1
              , argCallerAllocates = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "This function calls @fn for every header field, including every item of\nmetadata.\n\nLike all _map functions, the user function should return %NULL to continue\niteration, or a non-%NULL pointer to indicate early termination.\n\nSee also: vips_image_get_typeof(), vips_image_get()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Just True
      }
-}
#if defined(ENABLE_OVERLOADING)
-- XXX: Dummy instance, since code generation failed.
-- Please file a bug at http://github.com/haskell-gi/haskell-gi.
data ImageImageMapMethodInfo
instance (p ~ (), o ~ O.UnsupportedMethodError "imageMap" Image) => O.OverloadedMethod ImageImageMapMethodInfo o p where
    overloadedMethod = undefined

instance (o ~ O.UnsupportedMethodError "imageMap" Image) => O.OverloadedMethodInfo ImageImageMapMethodInfo o where
    overloadedMethodInfo = undefined

#endif

-- method Image::image_minimise_all
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#VipsImage to minimise"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_minimise_all" vips_image_minimise_all :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO ()

-- | 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 [Image::minimise]("GI.Vips.Objects.Image#g:signal:minimise") signal is emitted for all minimised images.
imageImageMinimiseAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: t'GI.Vips.Objects.Image.Image' to minimise
    -> m ()
imageImageMinimiseAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ()
imageImageMinimiseAll a
image = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr Image -> IO ()
vips_image_minimise_all Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageMinimiseAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageMinimiseAllMethodInfo a signature where
    overloadedMethod = imageImageMinimiseAll

instance O.OverloadedMethodInfo ImageImageMinimiseAllMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageMinimiseAll",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageMinimiseAll"
        })


#endif

-- method Image::image_pio_input
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to check" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_pio_input" vips_image_pio_input :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | Check that an image is readable with 'GI.Vips.Objects.Region.regionRegionPrepare' and friends.
-- If it isn\'t, try to transform the image so that 'GI.Vips.Objects.Region.regionRegionPrepare' can
-- work.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImagePioOutput', 'GI.Vips.Objects.Region.regionRegionPrepare'.
imageImagePioInput ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to check
    -> m Int32
    -- ^ __Returns:__ 0 on succeess, or -1 on error.
imageImagePioInput :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImagePioInput a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_pio_input Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImagePioInputMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImagePioInputMethodInfo a signature where
    overloadedMethod = imageImagePioInput

instance O.OverloadedMethodInfo ImageImagePioInputMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImagePioInput",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImagePioInput"
        })


#endif

-- method Image::image_pio_output
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to check" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_pio_output" vips_image_pio_output :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | 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: 'GI.Vips.Objects.Image.imageImagePioInput'.
imageImagePioOutput ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to check
    -> m Int32
    -- ^ __Returns:__ 0 on succeess, or -1 on error.
imageImagePioOutput :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImagePioOutput a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_pio_output Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImagePioOutputMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImagePioOutputMethodInfo a signature where
    overloadedMethod = imageImagePioOutput

instance O.OverloadedMethodInfo ImageImagePioOutputMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImagePioOutput",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImagePioOutput"
        })


#endif

-- method Image::image_print_field
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to get the header field from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "field"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_print_field" vips_image_print_field :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- field : TBasicType TUTF8
    IO ()

-- | Prints field /@name@/ to stdout as ASCII. Handy for debugging.
imageImagePrintField ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to get the header field from
    -> T.Text
    -> m ()
imageImagePrintField :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m ()
imageImagePrintField a
image Text
field = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
field' <- Text -> IO CString
textToCString Text
field
    Ptr Image -> CString -> IO ()
vips_image_print_field Ptr Image
image' CString
field'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
field'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImagePrintFieldMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImagePrintFieldMethodInfo a signature where
    overloadedMethod = imageImagePrintField

instance O.OverloadedMethodInfo ImageImagePrintFieldMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImagePrintField",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImagePrintField"
        })


#endif

-- method Image::image_remove
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name to search for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_remove" vips_image_remove :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    IO CInt

-- | Find and remove an item of metadata. Return 'P.False' if no metadata of that
-- name was found.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageSet', 'GI.Vips.Objects.Image.imageImageGetTypeof'.
imageImageRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to test
    -> T.Text
    -- ^ /@name@/: the name to search for
    -> m Bool
    -- ^ __Returns:__ 'P.True' if an item of metadata of that name was found and removed
imageImageRemove :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> m Bool
imageImageRemove a
image Text
name = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    CInt
result <- Ptr Image -> CString -> IO CInt
vips_image_remove Ptr Image
image' CString
name'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageRemoveMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageRemoveMethodInfo a signature where
    overloadedMethod = imageImageRemove

instance O.OverloadedMethodInfo ImageImageRemoveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageRemove",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageRemove"
        })


#endif

-- method Image::image_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to set the metadata on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name to give the metadata"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the %GValue to copy into the image"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set" vips_image_set :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TGValue
    IO ()

-- | 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 'GI.Vips.Objects.Image.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: 'GI.Vips.Objects.Image.imageImageGet'.
imageImageSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to set the metadata on
    -> T.Text
    -- ^ /@name@/: the name to give the metadata
    -> GValue
    -- ^ /@value@/: the @/GValue/@ to copy into the image
    -> m ()
imageImageSet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> GValue -> m ()
imageImageSet a
image Text
name GValue
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
    Ptr Image -> CString -> Ptr GValue -> IO ()
vips_image_set Ptr Image
image' CString
name' Ptr GValue
value'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetMethodInfo
instance (signature ~ (T.Text -> GValue -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetMethodInfo a signature where
    overloadedMethod = imageImageSet

instance O.OverloadedMethodInfo ImageImageSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSet"
        })


#endif

-- method Image::image_set_area
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "free_fn"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "CallbackFn" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "free function for @data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "pointer to area of memory"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_area" vips_image_set_area :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    FunPtr Vips.Callbacks.C_CallbackFn ->   -- free_fn : TInterface (Name {namespace = "Vips", name = "CallbackFn"})
    Ptr () ->                               -- data : TBasicType TPtr
    IO ()

-- | 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: 'GI.Vips.Objects.Image.imageImageGetDouble', 'GI.Vips.Objects.Image.imageImageSet'
imageImageSetArea ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Vips.Callbacks.CallbackFn
    -- ^ /@freeFn@/: free function for /@data@/
    -> m ()
imageImageSetArea :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> CallbackFn -> m ()
imageImageSetArea a
image Text
name CallbackFn
freeFn = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr (FunPtr CallbackFn)
ptrfreeFn <- IO (Ptr (FunPtr CallbackFn))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Vips.Callbacks.C_CallbackFn))
    FunPtr CallbackFn
freeFn' <- CallbackFn -> IO (FunPtr CallbackFn)
Vips.Callbacks.mk_CallbackFn (Maybe (Ptr (FunPtr CallbackFn)) -> CallbackFn -> CallbackFn
Vips.Callbacks.wrap_CallbackFn (Ptr (FunPtr CallbackFn) -> Maybe (Ptr (FunPtr CallbackFn))
forall a. a -> Maybe a
Just Ptr (FunPtr CallbackFn)
ptrfreeFn) CallbackFn
freeFn)
    Ptr (FunPtr CallbackFn) -> FunPtr CallbackFn -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr CallbackFn)
ptrfreeFn FunPtr CallbackFn
freeFn'
    let data_ :: Ptr a
data_ = Ptr a
forall a. Ptr a
nullPtr
    Ptr Image -> CString -> FunPtr CallbackFn -> ImageEvalCallback
vips_image_set_area Ptr Image
image' CString
name' FunPtr CallbackFn
freeFn' Ptr ()
forall a. Ptr a
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetAreaMethodInfo
instance (signature ~ (T.Text -> Vips.Callbacks.CallbackFn -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetAreaMethodInfo a signature where
    overloadedMethod = imageImageSetArea

instance O.OverloadedMethodInfo ImageImageSetAreaMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetArea",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetArea"
        })


#endif

-- method Image::image_set_array_double
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "array"
--           , argType = TCArray False (-1) 3 (TBasicType TDouble)
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "array of doubles" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the number of elements"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "n"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the number of elements"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_array_double" vips_image_set_array_double :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr CDouble ->                          -- array : TCArray False (-1) 3 (TBasicType TDouble)
    Int32 ->                                -- n : TBasicType TInt
    IO ()

-- | Attaches /@array@/ as a metadata item on /@image@/ as /@name@/.
-- A convenience function over 'GI.Vips.Objects.Image.imageImageSet'.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetImage', 'GI.Vips.Objects.Image.imageImageSet'.
imageImageSetArrayDouble ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Maybe ([Double])
    -- ^ /@array@/: array of doubles
    -> m ()
imageImageSetArrayDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Maybe [Double] -> m ()
imageImageSetArrayDouble a
image Text
name Maybe [Double]
array = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let n :: Int32
n = case Maybe [Double]
array of
            Maybe [Double]
Nothing -> Int32
0
            Just [Double]
jArray -> Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
jArray
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr CDouble
maybeArray <- case Maybe [Double]
array of
        Maybe [Double]
Nothing -> Ptr CDouble -> IO (Ptr CDouble)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CDouble
forall a. Ptr a
nullPtr
        Just [Double]
jArray -> do
            Ptr CDouble
jArray' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
jArray
            Ptr CDouble -> IO (Ptr CDouble)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CDouble
jArray'
    Ptr Image -> CString -> Ptr CDouble -> Int32 -> IO ()
vips_image_set_array_double Ptr Image
image' CString
name' Ptr CDouble
maybeArray Int32
n
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
maybeArray
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetArrayDoubleMethodInfo
instance (signature ~ (T.Text -> Maybe ([Double]) -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetArrayDoubleMethodInfo a signature where
    overloadedMethod = imageImageSetArrayDouble

instance O.OverloadedMethodInfo ImageImageSetArrayDoubleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetArrayDouble",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetArrayDouble"
        })


#endif

-- method Image::image_set_array_int
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "array"
--           , argType = TCArray False (-1) 3 (TBasicType TInt)
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "array of ints" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the number of elements"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "n"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the number of elements"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_array_int" vips_image_set_array_int :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr Int32 ->                            -- array : TCArray False (-1) 3 (TBasicType TInt)
    Int32 ->                                -- n : TBasicType TInt
    IO ()

-- | Attaches /@array@/ as a metadata item on /@image@/ as /@name@/.
-- A convenience function over 'GI.Vips.Objects.Image.imageImageSet'.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetImage', 'GI.Vips.Objects.Image.imageImageSet'.
imageImageSetArrayInt ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Maybe ([Int32])
    -- ^ /@array@/: array of ints
    -> m ()
imageImageSetArrayInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Maybe [Int32] -> m ()
imageImageSetArrayInt a
image Text
name Maybe [Int32]
array = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let n :: Int32
n = case Maybe [Int32]
array of
            Maybe [Int32]
Nothing -> Int32
0
            Just [Int32]
jArray -> Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Int32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Int32]
jArray
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Int32
maybeArray <- case Maybe [Int32]
array of
        Maybe [Int32]
Nothing -> Ptr Int32 -> IO (Ptr Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Int32
forall a. Ptr a
nullPtr
        Just [Int32]
jArray -> do
            Ptr Int32
jArray' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
jArray
            Ptr Int32 -> IO (Ptr Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Int32
jArray'
    Ptr Image -> CString -> Ptr Int32 -> Int32 -> IO ()
vips_image_set_array_int Ptr Image
image' CString
name' Ptr Int32
maybeArray Int32
n
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
maybeArray
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetArrayIntMethodInfo
instance (signature ~ (T.Text -> Maybe ([Int32]) -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetArrayIntMethodInfo a signature where
    overloadedMethod = imageImageSetArrayInt

instance O.OverloadedMethodInfo ImageImageSetArrayIntMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetArrayInt",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetArrayInt"
        })


#endif

-- method Image::image_set_blob
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "free_fn"
--           , argType =
--               TInterface Name { namespace = "Vips" , name = "CallbackFn" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "free function for @data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "pointer to area of memory"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "length of memory area"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_blob" vips_image_set_blob :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    FunPtr Vips.Callbacks.C_CallbackFn ->   -- free_fn : TInterface (Name {namespace = "Vips", name = "CallbackFn"})
    Ptr () ->                               -- data : TBasicType TPtr
    Word64 ->                               -- length : TBasicType TUInt64
    IO ()

-- | Attaches /@blob@/ as a metadata item on /@image@/ under the name /@name@/. A
-- convenience
-- function over 'GI.Vips.Objects.Image.imageImageSet' using a vips_blob.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetBlob', 'GI.Vips.Objects.Image.imageImageSet'.
imageImageSetBlob ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Vips.Callbacks.CallbackFn
    -- ^ /@freeFn@/: free function for /@data@/
    -> Word64
    -- ^ /@length@/: length of memory area
    -> m ()
imageImageSetBlob :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> CallbackFn -> Word64 -> m ()
imageImageSetBlob a
image Text
name CallbackFn
freeFn Word64
length_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr (FunPtr CallbackFn)
ptrfreeFn <- IO (Ptr (FunPtr CallbackFn))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Vips.Callbacks.C_CallbackFn))
    FunPtr CallbackFn
freeFn' <- CallbackFn -> IO (FunPtr CallbackFn)
Vips.Callbacks.mk_CallbackFn (Maybe (Ptr (FunPtr CallbackFn)) -> CallbackFn -> CallbackFn
Vips.Callbacks.wrap_CallbackFn (Ptr (FunPtr CallbackFn) -> Maybe (Ptr (FunPtr CallbackFn))
forall a. a -> Maybe a
Just Ptr (FunPtr CallbackFn)
ptrfreeFn) CallbackFn
freeFn)
    Ptr (FunPtr CallbackFn) -> FunPtr CallbackFn -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr CallbackFn)
ptrfreeFn FunPtr CallbackFn
freeFn'
    let data_ :: Ptr a
data_ = Ptr a
forall a. Ptr a
nullPtr
    Ptr Image
-> CString -> FunPtr CallbackFn -> Ptr () -> Word64 -> IO ()
vips_image_set_blob Ptr Image
image' CString
name' FunPtr CallbackFn
freeFn' Ptr ()
forall a. Ptr a
data_ Word64
length_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetBlobMethodInfo
instance (signature ~ (T.Text -> Vips.Callbacks.CallbackFn -> Word64 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetBlobMethodInfo a signature where
    overloadedMethod = imageImageSetBlob

instance O.OverloadedMethodInfo ImageImageSetBlobMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetBlob",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetBlob"
        })


#endif

-- method Image::image_set_blob_copy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "pointer to area of memory"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "length"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "length of memory area"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_blob_copy" vips_image_set_blob_copy :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr () ->                               -- data : TBasicType TPtr
    Word64 ->                               -- length : TBasicType TUInt64
    IO ()

-- | Attaches /@blob@/ as a metadata item on /@image@/ under the name /@name@/, taking
-- a copy of the memory area. A convenience function over
-- 'GI.Vips.Objects.Image.imageImageSetBlob'.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetBlob', 'GI.Vips.Objects.Image.imageImageSet'.
imageImageSetBlobCopy ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Ptr ()
    -- ^ /@data@/: pointer to area of memory
    -> Word64
    -- ^ /@length@/: length of memory area
    -> m ()
imageImageSetBlobCopy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Ptr () -> Word64 -> m ()
imageImageSetBlobCopy a
image Text
name Ptr ()
data_ Word64
length_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Image -> CString -> Ptr () -> Word64 -> IO ()
vips_image_set_blob_copy Ptr Image
image' CString
name' Ptr ()
data_ Word64
length_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetBlobCopyMethodInfo
instance (signature ~ (T.Text -> Ptr () -> Word64 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetBlobCopyMethodInfo a signature where
    overloadedMethod = imageImageSetBlobCopy

instance O.OverloadedMethodInfo ImageImageSetBlobCopyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetBlobCopy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetBlobCopy"
        })


#endif

-- method Image::image_set_delete_on_close
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to set" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "delete_on_close"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "format of file" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_delete_on_close" vips_image_set_delete_on_close :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CInt ->                                 -- delete_on_close : TBasicType TBoolean
    IO ()

-- | 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: 'GI.Vips.Objects.Image.imageNewTempFile'.
imageImageSetDeleteOnClose ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to set
    -> Bool
    -- ^ /@deleteOnClose@/: format of file
    -> m ()
imageImageSetDeleteOnClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Bool -> m ()
imageImageSetDeleteOnClose a
image Bool
deleteOnClose = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    let deleteOnClose' :: CInt
deleteOnClose' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
deleteOnClose
    Ptr Image -> CInt -> IO ()
vips_image_set_delete_on_close Ptr Image
image' CInt
deleteOnClose'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetDeleteOnCloseMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetDeleteOnCloseMethodInfo a signature where
    overloadedMethod = imageImageSetDeleteOnClose

instance O.OverloadedMethodInfo ImageImageSetDeleteOnCloseMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetDeleteOnClose",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetDeleteOnClose"
        })


#endif

-- method Image::image_set_double
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "d"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_double" vips_image_set_double :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    CDouble ->                              -- d : TBasicType TDouble
    IO ()

-- | Attaches /@d@/ as a metadata item on /@image@/ as /@name@/. A
-- convenience
-- function over 'GI.Vips.Objects.Image.imageImageSet'.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetDouble', 'GI.Vips.Objects.Image.imageImageSet'
imageImageSetDouble ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Double
    -- ^ /@d@/: metadata value
    -> m ()
imageImageSetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Double -> m ()
imageImageSetDouble a
image Text
name Double
d = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    let d' :: CDouble
d' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
d
    Ptr Image -> CString -> CDouble -> IO ()
vips_image_set_double Ptr Image
image' CString
name' CDouble
d'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetDoubleMethodInfo a signature where
    overloadedMethod = imageImageSetDouble

instance O.OverloadedMethodInfo ImageImageSetDoubleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetDouble",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetDouble"
        })


#endif

-- method Image::image_set_image
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "im"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_image" vips_image_set_image :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr Image ->                            -- im : TInterface (Name {namespace = "Vips", name = "Image"})
    IO ()

-- | Attaches /@im@/ as a metadata item on /@image@/ as /@name@/.
-- A convenience function over 'GI.Vips.Objects.Image.imageImageSet'.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetImage', 'GI.Vips.Objects.Image.imageImageSet'.
imageImageSetImage ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a, IsImage b) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> b
    -- ^ /@im@/: metadata value
    -> m ()
imageImageSetImage :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsImage a, IsImage b) =>
a -> Text -> b -> m ()
imageImageSetImage a
image Text
name b
im = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Image
im' <- b -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
im
    Ptr Image -> CString -> Ptr Image -> IO ()
vips_image_set_image Ptr Image
image' CString
name' Ptr Image
im'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
im
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetImageMethodInfo
instance (signature ~ (T.Text -> b -> m ()), MonadIO m, IsImage a, IsImage b) => O.OverloadedMethod ImageImageSetImageMethodInfo a signature where
    overloadedMethod = imageImageSetImage

instance O.OverloadedMethodInfo ImageImageSetImageMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetImage",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetImage"
        })


#endif

-- method Image::image_set_int
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "i"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_int" vips_image_set_int :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    Int32 ->                                -- i : TBasicType TInt
    IO ()

-- | Attaches /@i@/ as a metadata item on /@image@/ under the name /@name@/. A
-- convenience
-- function over 'GI.Vips.Objects.Image.imageImageSet'.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetInt', 'GI.Vips.Objects.Image.imageImageSet'
imageImageSetInt ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> Int32
    -- ^ /@i@/: metadata value
    -> m ()
imageImageSetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Int32 -> m ()
imageImageSetInt a
image Text
name Int32
i = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Image -> CString -> Int32 -> IO ()
vips_image_set_int Ptr Image
image' CString
name' Int32
i
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetIntMethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetIntMethodInfo a signature where
    overloadedMethod = imageImageSetInt

instance O.OverloadedMethodInfo ImageImageSetIntMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetInt",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetInt"
        })


#endif

-- method Image::image_set_kill
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to test" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "kill"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the kill state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_kill" vips_image_set_kill :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CInt ->                                 -- kill : TBasicType TBoolean
    IO ()

-- | Set the t'GI.Vips.Objects.Image.Image'.@/kill/@ flag on an image. Handy for stopping sets of
-- threads.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageIskilled'.
imageImageSetKill ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to test
    -> Bool
    -- ^ /@kill@/: the kill state
    -> m ()
imageImageSetKill :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Bool -> m ()
imageImageSetKill a
image Bool
kill = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    let kill' :: CInt
kill' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
kill
    Ptr Image -> CInt -> IO ()
vips_image_set_kill Ptr Image
image' CInt
kill'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetKillMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetKillMethodInfo a signature where
    overloadedMethod = imageImageSetKill

instance O.OverloadedMethodInfo ImageImageSetKillMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetKill",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetKill"
        })


#endif

-- method Image::image_set_progress
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to signal progress on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "progress"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "turn progress reporting on or off"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_progress" vips_image_set_progress :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CInt ->                                 -- progress : TBasicType TBoolean
    IO ()

-- | vips signals evaluation progress via the [Image::preeval]("GI.Vips.Objects.Image#g:signal:preeval"),
-- [Image::eval]("GI.Vips.Objects.Image#g:signal:eval") and [Image::posteval]("GI.Vips.Objects.Image#g:signal:posteval")
-- signals. Progress is signalled on the most-downstream image for which
-- 'GI.Vips.Objects.Image.imageImageSetProgress' was called.
imageImageSetProgress ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to signal progress on
    -> Bool
    -- ^ /@progress@/: turn progress reporting on or off
    -> m ()
imageImageSetProgress :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Bool -> m ()
imageImageSetProgress a
image Bool
progress = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    let progress' :: CInt
progress' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
progress
    Ptr Image -> CInt -> IO ()
vips_image_set_progress Ptr Image
image' CInt
progress'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetProgressMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetProgressMethodInfo a signature where
    overloadedMethod = imageImageSetProgress

instance O.OverloadedMethodInfo ImageImageSetProgressMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetProgress",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetProgress"
        })


#endif

-- method Image::image_set_string
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to attach the metadata to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "str"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "metadata value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_set_string" vips_image_set_string :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- str : TBasicType TUTF8
    IO ()

-- | Attaches /@str@/ as a metadata item on /@image@/ as /@name@/.
-- A convenience
-- function over 'GI.Vips.Objects.Image.imageImageSet' using @/VIPS_TYPE_REF_STRING/@.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageGetDouble', 'GI.Vips.Objects.Image.imageImageSet'.
imageImageSetString ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to attach the metadata to
    -> T.Text
    -- ^ /@name@/: metadata name
    -> T.Text
    -- ^ /@str@/: metadata value
    -> m ()
imageImageSetString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Text -> Text -> m ()
imageImageSetString a
image Text
name Text
str = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
str' <- Text -> IO CString
textToCString Text
str
    Ptr Image -> CString -> CString -> IO ()
vips_image_set_string Ptr Image
image' CString
name' CString
str'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageImageSetStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageSetStringMethodInfo a signature where
    overloadedMethod = imageImageSetString

instance O.OverloadedMethodInfo ImageImageSetStringMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageSetString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageSetString"
        })


#endif

-- method Image::image_wio_input
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to transform" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_wio_input" vips_image_wio_input :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | 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
-- 'GI.Vips.Objects.Image.imageImageCopyMemory' instead.
-- 
-- See also: 'GI.Vips.Objects.Image.imageImageCopyMemory', 'GI.Vips.Objects.Image.imageImagePioInput',
-- 'GI.Vips.Objects.Image.imageImageInplace', @/VIPS_IMAGE_ADDR()/@.
imageImageWioInput ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to transform
    -> m Int32
    -- ^ __Returns:__ 0 on succeess, or -1 on error.
imageImageWioInput :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageWioInput a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_wio_input Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageWioInputMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWioInputMethodInfo a signature where
    overloadedMethod = imageImageWioInput

instance O.OverloadedMethodInfo ImageImageWioInputMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWioInput",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWioInput"
        })


#endif

-- method Image::image_write
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to write" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "write to this image"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_write" vips_image_write :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr (Ptr Image) ->                      -- out : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | Write /@image@/ to /@out@/. Use 'GI.Vips.Objects.Image.imageNew' and friends to create the
-- t'GI.Vips.Objects.Image.Image' you want to write to.
-- 
-- See also: 'GI.Vips.Objects.Image.imageNew', @/vips_copy()/@, @/vips_image_write_to_file()/@.
imageImageWrite ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to write
    -> m ((Int32, Image))
    -- ^ __Returns:__ 0 on success, or -1 on error.
imageImageWrite :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m (Int32, Image)
imageImageWrite a
image = IO (Int32, Image) -> m (Int32, Image)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Image) -> m (Int32, Image))
-> IO (Int32, Image) -> m (Int32, Image)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr (Ptr Image)
out <- IO (Ptr (Ptr Image))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Image))
    Int32
result <- Ptr Image -> Ptr (Ptr Image) -> IO Int32
vips_image_write Ptr Image
image' Ptr (Ptr Image)
out
    Ptr Image
out' <- Ptr (Ptr Image) -> IO (Ptr Image)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Image)
out
    Image
out'' <- ((ManagedPtr Image -> Image) -> Ptr Image -> IO Image
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Image -> Image
Image) Ptr Image
out'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Ptr (Ptr Image) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Image)
out
    (Int32, Image) -> IO (Int32, Image)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Image
out'')

#if defined(ENABLE_OVERLOADING)
data ImageImageWriteMethodInfo
instance (signature ~ (m ((Int32, Image))), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWriteMethodInfo a signature where
    overloadedMethod = imageImageWrite

instance O.OverloadedMethodInfo ImageImageWriteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWrite",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWrite"
        })


#endif

-- method Image::image_write_line
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to write to" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ypos"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "vertical position of scan-line to write"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "linebuffer"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "scanline of pixels" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_write_line" vips_image_write_line :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    Int32 ->                                -- ypos : TBasicType TInt
    Word8 ->                                -- linebuffer : TBasicType TUInt8
    IO Int32

-- | Write a line of pixels to an image. This function must be called repeatedly
-- with /@ypos@/ increasing from 0 to t'GI.Vips.Objects.Image.Image'::@/height/@ .
-- /@linebuffer@/ must be @/VIPS_IMAGE_SIZEOF_LINE()/@ bytes long.
-- 
-- See also: @/vips_image_generate()/@.
imageImageWriteLine ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to write to
    -> Int32
    -- ^ /@ypos@/: vertical position of scan-line to write
    -> Word8
    -- ^ /@linebuffer@/: scanline of pixels
    -> m Int32
    -- ^ __Returns:__ 0 on success, or -1 on error.
imageImageWriteLine :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Int32 -> Word8 -> m Int32
imageImageWriteLine a
image Int32
ypos Word8
linebuffer = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> Int32 -> Word8 -> IO Int32
vips_image_write_line Ptr Image
image' Int32
ypos Word8
linebuffer
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageWriteLineMethodInfo
instance (signature ~ (Int32 -> Word8 -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWriteLineMethodInfo a signature where
    overloadedMethod = imageImageWriteLine

instance O.OverloadedMethodInfo ImageImageWriteLineMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWriteLine",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWriteLine"
        })


#endif

-- method Image::image_write_prepare
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to prepare" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_write_prepare" vips_image_write_prepare :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    IO Int32

-- | 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
-- 'GI.Vips.Objects.Image.imageImageWriteLine'. You will need to call it yourself if you plan to
-- write directly to the ->data member of a memory image.
imageImageWritePrepare ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: image to prepare
    -> m Int32
    -- ^ __Returns:__ 0 on success, or -1 on error.
imageImageWritePrepare :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m Int32
imageImageWritePrepare a
image = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Int32
result <- Ptr Image -> IO Int32
vips_image_write_prepare Ptr Image
image'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageImageWritePrepareMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWritePrepareMethodInfo a signature where
    overloadedMethod = imageImageWritePrepare

instance O.OverloadedMethodInfo ImageImageWritePrepareMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWritePrepare",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWritePrepare"
        })


#endif

-- method Image::image_write_to_memory
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "in"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "image to write" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TUInt64
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return buffer length here"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "size"
--              , argType = TBasicType TUInt64
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "return buffer length here"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just (TCArray False (-1) 1 (TBasicType TUInt8))
-- throws : False
-- Skip return : False

foreign import ccall "vips_image_write_to_memory" vips_image_write_to_memory :: 
    Ptr Image ->                            -- in : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr Word64 ->                           -- size : TBasicType TUInt64
    IO (Ptr Word8)

-- | Writes /@in@/ to memory as a simple, unformatted C-style array.
-- 
-- The caller is responsible for freeing this memory with 'GI.GLib.Functions.free'.
-- 
-- See also: @/vips_image_write_to_buffer()/@.
imageImageWriteToMemory ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@in@/: image to write
    -> m ByteString
    -- ^ __Returns:__ return buffer start here
imageImageWriteToMemory :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> m ByteString
imageImageWriteToMemory a
in_ = IO ByteString -> m ByteString
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ByteString -> m ByteString) -> IO ByteString -> m ByteString
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
in_' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
in_
    Ptr Word64
size <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
    Ptr Word8
result <- Ptr Image -> Ptr Word64 -> IO (Ptr Word8)
vips_image_write_to_memory Ptr Image
in_' Ptr Word64
size
    Word64
size' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
size
    Text -> Ptr Word8 -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"imageImageWriteToMemory" Ptr Word8
result
    ByteString
result' <- (Word64 -> Ptr Word8 -> IO ByteString
forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Word64
size') Ptr Word8
result
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
in_
    Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
size
    ByteString -> IO ByteString
forall (m :: * -> *) a. Monad m => a -> m a
return ByteString
result'

#if defined(ENABLE_OVERLOADING)
data ImageImageWriteToMemoryMethodInfo
instance (signature ~ (m ByteString), MonadIO m, IsImage a) => O.OverloadedMethod ImageImageWriteToMemoryMethodInfo a signature where
    overloadedMethod = imageImageWriteToMemory

instance O.OverloadedMethodInfo ImageImageWriteToMemoryMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageImageWriteToMemory",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageImageWriteToMemory"
        })


#endif

-- method Image::reorder_margin_hint
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the image to hint on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the size of the margin this operation has added"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "vips_reorder_margin_hint" vips_reorder_margin_hint :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    Int32 ->                                -- margin : TBasicType TInt
    IO ()

-- | 'GI.Vips.Objects.Image.imageReorderMarginHint' sets a hint that /@image@/ contains a margin, that
-- is, that each 'GI.Vips.Objects.Region.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()/@.
imageReorderMarginHint ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: the image to hint on
    -> Int32
    -- ^ /@margin@/: the size of the margin this operation has added
    -> m ()
imageReorderMarginHint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> Int32 -> m ()
imageReorderMarginHint a
image Int32
margin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    Ptr Image -> Int32 -> IO ()
vips_reorder_margin_hint Ptr Image
image' Int32
margin
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ImageReorderMarginHintMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsImage a) => O.OverloadedMethod ImageReorderMarginHintMethodInfo a signature where
    overloadedMethod = imageReorderMarginHint

instance O.OverloadedMethodInfo ImageReorderMarginHintMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageReorderMarginHint",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageReorderMarginHint"
        })


#endif

-- method Image::reorder_prepare_many
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "image"
--           , argType = TInterface Name { namespace = "Vips" , name = "Image" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the image that's being written"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "regions"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 (-1)
--                 (TInterface Name { namespace = "Vips" , name = "Region" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the set of regions to prepare"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "r"
--           , argType = TInterface Name { namespace = "Vips" , name = "Rect" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #VipsRect to prepare on each region"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "vips_reorder_prepare_many" vips_reorder_prepare_many :: 
    Ptr Image ->                            -- image : TInterface (Name {namespace = "Vips", name = "Image"})
    Ptr (Ptr Vips.Region.Region) ->         -- regions : TCArray False (-1) (-1) (TInterface (Name {namespace = "Vips", name = "Region"}))
    Ptr Vips.Rect.Rect ->                   -- r : TInterface (Name {namespace = "Vips", name = "Rect"})
    IO Int32

-- | 'GI.Vips.Objects.Image.imageReorderPrepareMany' runs 'GI.Vips.Objects.Region.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: 'GI.Vips.Objects.Region.regionRegionPrepare', 'GI.Vips.Objects.Image.imageReorderMarginHint'.
imageReorderPrepareMany ::
    (B.CallStack.HasCallStack, MonadIO m, IsImage a) =>
    a
    -- ^ /@image@/: the image that\'s being written
    -> [Vips.Region.Region]
    -- ^ /@regions@/: the set of regions to prepare
    -> Vips.Rect.Rect
    -- ^ /@r@/: the t'GI.Vips.Structs.Rect.Rect' to prepare on each region
    -> m Int32
    -- ^ __Returns:__ 0 on success, or -1 on error.
imageReorderPrepareMany :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsImage a) =>
a -> [Region] -> Rect -> m Int32
imageReorderPrepareMany a
image [Region]
regions Rect
r = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Image
image' <- a -> IO (Ptr Image)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
image
    [Ptr Region]
regions' <- (Region -> IO (Ptr Region)) -> [Region] -> IO [Ptr Region]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Region -> IO (Ptr Region)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Region]
regions
    Ptr (Ptr Region)
regions'' <- [Ptr Region] -> IO (Ptr (Ptr Region))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr Region]
regions'
    Ptr Rect
r' <- Rect -> IO (Ptr Rect)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rect
r
    Int32
result <- Ptr Image -> Ptr (Ptr Region) -> Ptr Rect -> IO Int32
vips_reorder_prepare_many Ptr Image
image' Ptr (Ptr Region)
regions'' Ptr Rect
r'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
image
    (Region -> IO ()) -> [Region] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Region]
regions
    Rect -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rect
r
    Ptr (Ptr Region) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Region)
regions''
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data ImageReorderPrepareManyMethodInfo
instance (signature ~ ([Vips.Region.Region] -> Vips.Rect.Rect -> m Int32), MonadIO m, IsImage a) => O.OverloadedMethod ImageReorderPrepareManyMethodInfo a signature where
    overloadedMethod = imageReorderPrepareMany

instance O.OverloadedMethodInfo ImageReorderPrepareManyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.Image.imageReorderPrepareMany",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.2/docs/GI-Vips-Objects-Image.html#v:imageReorderPrepareMany"
        })


#endif