Skip to content

Group CImage

Modules > CImage

The functions in this section provide access to information and functionality of images. This includes creation, destruction, and saving as well as a wealth of information including things like width, height, stride, and timestamp.

Public Functions

Type Name
spinImageCalculateStatistics (spinImage hImage, const spinImageStatistics hStatistics)
spinImageCheckCRC (spinImage hImage, bool8_t * pbCheckCRC)
spinImageCreate (spinImage hSrcImage, spinImage * phDestImage)
spinImageCreateEmpty (spinImage * phImage)
spinImageCreateEx (spinImage * phImage, size_t width, size_t height, size_t offsetX, size_t offsetY, spinPixelFormatEnums pixelFormat, void * pData)
spinImageCreateEx2 (spinImage * phImage, size_t width, size_t height, size_t offsetX, size_t offsetY, spinPixelFormatEnums pixelFormat, void * pData, spinTLPayloadType dataPayloadType, size_t dataSize)
spinImageDeepCopy (spinImage hSrcImage, spinImage hDestImage)
spinImageDestroy (spinImage hImage)
spinImageGetBitsPerPixel (spinImage hImage, size_t * pBitsPerPixel)
spinImageGetBufferSize (spinImage hImage, size_t * pSize)
spinImageGetChunkLayoutID (spinImage hImage, uint64_t * pId)
spinImageGetColorProcessing (spinImage hImage, spinColorProcessingAlgorithm * pAlgorithm)
spinImageGetData (spinImage hImage, void ** ppData)
spinImageGetFrameID (spinImage hImage, uint64_t * pFrameID)
spinImageGetHeight (spinImage hImage, size_t * pHeight)
spinImageGetID (spinImage hImage, uint64_t * pId)
spinImageGetOffsetX (spinImage hImage, size_t * pOffsetX)
spinImageGetOffsetY (spinImage hImage, size_t * pOffsetY)
spinImageGetPaddingX (spinImage hImage, size_t * pPaddingX)
spinImageGetPaddingY (spinImage hImage, size_t * pPaddingY)
spinImageGetPayloadType (spinImage hImage, size_t * pPayloadType)
spinImageGetPixelFormat (spinImage hImage, spinPixelFormatEnums * pPixelFormat)
spinImageGetPixelFormatName (spinImage hImage, char * pBuf, size_t * pBufLen)
spinImageGetPrivateData (spinImage hImage, void ** ppData)
spinImageGetSize (spinImage hImage, size_t * pImageSize)
spinImageGetStatus (spinImage hImage, spinImageStatus * pStatus)
spinImageGetStatusDescription (spinImageStatus status, char * pBuf, size_t * pBufLen)
spinImageGetStride (spinImage hImage, size_t * pStride)
spinImageGetTLPayloadType (spinImage hImage, spinTLPayloadType * pPayloadType)
spinImageGetTLPixelFormat (spinImage hImage, uint64_t * pPixelFormat)
spinImageGetTLPixelFormatNamespace (spinImage hImage, spinTLPixelFormatNamespace * pPixelFormatNamespace)
spinImageGetTimeStamp (spinImage hImage, uint64_t * pTimeStamp)
spinImageGetValidPayloadSize (spinImage hImage, size_t * pSize)
spinImageGetWidth (spinImage hImage, size_t * pWidth)
spinImageHasCRC (spinImage hImage, bool8_t * pbHasCRC)
spinImageIsIncomplete (spinImage hImage, bool8_t * pbIsIncomplete)
spinImageLoad (spinImage * phImage, const char * fileName)
spinImageRelease (spinImage hImage)
spinImageReset (spinImage hImage, size_t width, size_t height, size_t offsetX, size_t offsetY, spinPixelFormatEnums pixelFormat)
spinImageResetEx (spinImage hImage, size_t width, size_t height, size_t offsetX, size_t offsetY, spinPixelFormatEnums pixelFormat, void * pData)
spinImageSave (spinImage hImage, const char * pFilename, spinImageFileFormat format)
spinImageSaveBmp (spinImage hImage, const char * pFilename, const spinBMPOption * pOption)
spinImageSaveFromExt (spinImage hImage, const char * pFilename)
spinImageSaveJpeg (spinImage hImage, const char * pFilename, const spinJPEGOption * pOption)
spinImageSaveJpg2 (spinImage hImage, const char * pFilename, const spinJPG2Option * pOption)
spinImageSavePgm (spinImage hImage, const char * pFilename, const spinPGMOption * pOption)
spinImageSavePng (spinImage hImage, const char * pFilename, const spinPNGOption * pOption)
spinImageSavePpm (spinImage hImage, const char * pFilename, const spinPPMOption * pOption)
spinImageSaveTiff (spinImage hImage, const char * pFilename, const spinTIFFOption * pOption)

Public Functions Documentation

function spinImageCalculateStatistics

spinImageCalculateStatistics (
    spinImage hImage,
    const spinImageStatistics hStatistics
) 

Calculates the image statistics of an image

See also: spinError

Parameters:

  • hImage The image to be saved
  • hStatistics The image statistics context in which the calculated statistics are returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageCheckCRC

spinImageCheckCRC (
    spinImage hImage,
    bool8_t * pbCheckCRC
) 

Checks whether the CRC of an image is correct

See also: spinError

Parameters:

  • hImage The image to be saved
  • pbCheckCRC The boolean pointer to return whether the image CRC passes

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageCreate

spinImageCreate (
    spinImage hSrcImage,
    spinImage * phDestImage
) 

Creates an image from another; images created this way must be destroyed

See also: spinError

Parameters:

  • hSrcImage The image to be copied
  • phDestImage The image handle pointer of the image to be created

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageCreateEmpty

spinImageCreateEmpty (
    spinImage * phImage
) 

Creates an empty image; images created this way must be destroyed

See also: spinError

Parameters:

  • phImage The image handle pointer in which the empty image is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageCreateEx

spinImageCreateEx (
    spinImage * phImage,
    size_t width,
    size_t height,
    size_t offsetX,
    size_t offsetY,
    spinPixelFormatEnums pixelFormat,
    void * pData
) 

Creates an image with some set properties; images created this way must be destroyed

See also: spinError

Parameters:

  • phImage The image handle pointer in which the image is returned
  • width The width to set
  • height The height to set
  • offsetX The offset along the X axis to set
  • offsetY The offset along the Y axis to set
  • pixelFormat The pixel format to set
  • pData The image data to set; can be set to null

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageCreateEx2

spinImageCreateEx2 (
    spinImage * phImage,
    size_t width,
    size_t height,
    size_t offsetX,
    size_t offsetY,
    spinPixelFormatEnums pixelFormat,
    void * pData,
    spinTLPayloadType dataPayloadType,
    size_t dataSize
) 

Creates an image with some set properties; images created this way must be destroyed

See also: spinError

See also: spinImageGetTLPayloadType

Parameters:

  • phImage The image handle pointer in which the image is returned
  • width The width to set
  • height The height to set
  • offsetX The offset along the X axis to set
  • offsetY The offset along the Y axis to set
  • pixelFormat The pixel format to set
  • pData The image data to set; can be set to null
  • dataPayloadType The payload type of the data. This value can be retrieved from an existing image by using the spinImageGetTLPayloadType() function call.
  • dataSize The size of the provided data in bytes

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageDeepCopy

spinImageDeepCopy (
    spinImage hSrcImage,
    spinImage hDestImage
) 

Creates a deep copy of an image (the destination image must be created as an empty image prior to the deep copy)

See also: spinError

Parameters:

  • hSrcImage The image to be copied
  • hDestImage The image handle in which the image is copied

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageDestroy

spinImageDestroy (
    spinImage hImage
) 

Destroys an image

See also: spinError

Parameters:

  • hImage The image to destroy

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetBitsPerPixel

spinImageGetBitsPerPixel (
    spinImage hImage,
    size_t * pBitsPerPixel
) 

Retrieves the number of bits per pixel of an image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pBitsPerPixel The unsigned integer pointer in which the number of bits per pixel is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetBufferSize

spinImageGetBufferSize (
    spinImage hImage,
    size_t * pSize
) 

Retrieves the buffer size of an image

See also: spinError

Parameters:

  • hImage The image of image data buffer to retrieve
  • pSize The unsigned integer pointer in which the size of the image data if returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetChunkLayoutID

spinImageGetChunkLayoutID (
    spinImage hImage,
    uint64_t * pId
) 

Retrieves the chunk layout ID of an image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pId The unsigned integer pointer in which the chunk layout ID is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetColorProcessing

spinImageGetColorProcessing (
    spinImage hImage,
    spinColorProcessingAlgorithm * pAlgorithm
) 

Retrieves the color processing algorithm of a specific image

See also: spinError

Parameters:

  • hImage The image of the color processing algorithm to retrieve
  • pAlgorithm The color processing algorithm pointer in which the color processing algorithm is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetData

spinImageGetData (
    spinImage hImage,
    void ** ppData
) 

Retrieves the image data of an image

See also: spinError

Parameters:

  • hImage The image of the image data to retrieve
  • ppData The pointer to the void pointer in which the image data is retrieved

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetFrameID

spinImageGetFrameID (
    spinImage hImage,
    uint64_t * pFrameID
) 

Retrieves the frame ID of an image

See also: spinError

Parameters:

  • hImage The image of the frame ID to retrieve
  • pFrameID The unsigned integer pointer in which the frame ID is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetHeight

spinImageGetHeight (
    spinImage hImage,
    size_t * pHeight
) 

Retrieves the height of an image

See also: spinError

Parameters:

  • hImage The image of the height to retrieve
  • pHeight The unsigned integer pointer in which the height is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetID

spinImageGetID (
    spinImage hImage,
    uint64_t * pId
) 

Retrieves the ID of an image

See also: spinError

Parameters:

  • hImage The image of the ID to retrieve
  • pId The unsigned integer pointer in which the ID is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetOffsetX

spinImageGetOffsetX (
    spinImage hImage,
    size_t * pOffsetX
) 

Retrieves the offset of an image along its X axis

See also: spinError

Parameters:

  • hImage The image of the offset along the X axis to retrieve
  • pOffsetX The unsigned integer pointer in which the offset along the X axis is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetOffsetY

spinImageGetOffsetY (
    spinImage hImage,
    size_t * pOffsetY
) 

Retrieves the offset of an image along its Y axis

See also: spinError

Parameters:

  • hImage The image of the offset along the Y axis to retrieve
  • pOffsetY The unsigned integer pointer in which the offset along the Y axis is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetPaddingX

spinImageGetPaddingX (
    spinImage hImage,
    size_t * pPaddingX
) 

Retrieves the padding of an image along its X axis

See also: spinError

Parameters:

  • hImage The image of the padding along the X axis to retrieve
  • pPaddingX The unsigned integer pointer in which the padding along the X axis is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetPaddingY

spinImageGetPaddingY (
    spinImage hImage,
    size_t * pPaddingY
) 

Retrieves the padding of an image along its Y axis

See also: spinError

Parameters:

  • hImage The image of the padding along the Y axis to retrieve
  • pPaddingY The unsigned integer pointer in which the padding along the Y axis is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetPayloadType

spinImageGetPayloadType (
    spinImage hImage,
    size_t * pPayloadType
) 

Retrieves the payload type of an image (as an enum, spinPayloadTypeInfoIds)

See also: spinError

See also: spinPayloadTypeInfoIds

Parameters:

  • hImage The image of the payload type to retrieve
  • pPayloadType The payload type enum pointer in which the payload type is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetPixelFormat

spinImageGetPixelFormat (
    spinImage hImage,
    spinPixelFormatEnums * pPixelFormat
) 

Retrieves the pixel format of an image (as an enum, spinPixelFormatEnums)

See also: spinError

See also: spinPixelFormatEnums

Parameters:

  • hImage The image of the pixel format to retrieve
  • pPixelFormat The pixel format enum pointer in which the pixel format is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetPixelFormatName

spinImageGetPixelFormatName (
    spinImage hImage,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the pixel format of an image (as a symbolic)

See also: spinError

Parameters:

  • hImage The image of the pixel format to retrieve
  • pBuf The c-string character buffer in which the pixel format symbolic is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetPrivateData

spinImageGetPrivateData (
    spinImage hImage,
    void ** ppData
) 

Retrieves the private data of an image

See also: spinError

Parameters:

  • hImage The image of the private image data to retrieve
  • ppData The pointer to the void pointer in which the private image data is retrieved

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetSize

spinImageGetSize (
    spinImage hImage,
    size_t * pImageSize
) 

Retrieves the size of an image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pImageSize The unsigned integer pointer in which the size of the image is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetStatus

spinImageGetStatus (
    spinImage hImage,
    spinImageStatus * pStatus
) 

Retrieves the image status of an image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pStatus The status enum pointer in which the image status is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetStatusDescription

spinImageGetStatusDescription (
    spinImageStatus status,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the description of image status

See also: spinError

Parameters:

  • status The status enum
  • pBuf The c-string character buffer in which the explanation of image status enum is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length; if pBuf is NULL, minimum length of string buffer is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetStride

spinImageGetStride (
    spinImage hImage,
    size_t * pStride
) 

Retrieves the stride of an image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pStride The unsigned integer pointer in which the stride is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetTLPayloadType

spinImageGetTLPayloadType (
    spinImage hImage,
    spinTLPayloadType * pPayloadType
) 

Retrieves the transport layer payload type of an image (as an enum, spinPayloadTypeInfoIds)

See also: spinError

See also: spinPayloadTypeInfoIds

Parameters:

  • hImage The image of the TL payload type to retrieve
  • pPayloadType The payload type enum pointer in which the TL payload type is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetTLPixelFormat

spinImageGetTLPixelFormat (
    spinImage hImage,
    uint64_t * pPixelFormat
) 

Retrieves the transport layer pixel format of an image (as an unsigned integer)

See also: spinError

Parameters:

  • hImage The image of the TL pixel format to retrieve
  • pPixelFormat The unsigned integer pointer in which the TL pixel format is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetTLPixelFormatNamespace

spinImageGetTLPixelFormatNamespace (
    spinImage hImage,
    spinTLPixelFormatNamespace * pPixelFormatNamespace
) 

Retrieves the transport layer pixel format namespace of an image (as an enum, spinPixelFormatNamespaceID)

See also: spinError

See also: spinPixelFormatNamespaceID

Parameters:

  • hImage The image of the TL pixel format namespace to retrieve
  • pPixelFormatNamespace The pixel format namespace pointer in which the pixel format namespace is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetTimeStamp

spinImageGetTimeStamp (
    spinImage hImage,
    uint64_t * pTimeStamp
) 

Retrieves the timestamp of an image

See also: spinError

Parameters:

  • hImage The image of the timestamp to retrieve
  • pTimeStamp The unsigned integer pointer om which the timestamp is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetValidPayloadSize

spinImageGetValidPayloadSize (
    spinImage hImage,
    size_t * pSize
) 

Retrieves the valid payload size of an image

See also: spinError

Parameters:

  • hImage The image of the payload size to retrieve
  • pSize The unsigned integer pointer in which the size of the valid payload is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageGetWidth

spinImageGetWidth (
    spinImage hImage,
    size_t * pWidth
) 

Retrieves the width of an image

See also: spinError

Parameters:

  • hImage The image of the width to retrieve
  • pWidth The unsigned integer pointer in which the width is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageHasCRC

spinImageHasCRC (
    spinImage hImage,
    bool8_t * pbHasCRC
) 

Checks whether an image has CRC

See also: spinError

Parameters:

  • hImage The image to be saved
  • pbHasCRC The boolean pointer to return whether the image has CRC available

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageIsIncomplete

spinImageIsIncomplete (
    spinImage hImage,
    bool8_t * pbIsIncomplete
) 

Checks whether an image is incomplete

See also: spinError

Parameters:

  • hImage The image to check
  • pbIsIncomplete The boolean pointer to return whether or not the image is incomplete

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageLoad

spinImageLoad (
    spinImage * phImage,
    const char * fileName
) 

Creates an image object from file.

See also: spinError

Parameters:

  • phImage The image handle pointer in which the image is returned
  • fileName Name of the file to load an image object from.

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageRelease

spinImageRelease (
    spinImage hImage
) 

Releases an image

See also: spinError

Parameters:

  • hImage The image to be saved

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageReset

spinImageReset (
    spinImage hImage,
    size_t width,
    size_t height,
    size_t offsetX,
    size_t offsetY,
    spinPixelFormatEnums pixelFormat
) 

Resets an image with some set properties

See also: spinError

Parameters:

  • hImage The image to be reset
  • width The width to be reset to
  • height The height to be reset to
  • offsetX The offset to be reset to along the X axis
  • offsetY The offset to be reset to along the Y axis
  • pixelFormat The pixel format to be reset to

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageResetEx

spinImageResetEx (
    spinImage hImage,
    size_t width,
    size_t height,
    size_t offsetX,
    size_t offsetY,
    spinPixelFormatEnums pixelFormat,
    void * pData
) 

Resets an image with some set properties and image data

See also: spinError

Parameters:

  • hImage The image to reset
  • width The width to be reset to
  • height The height to be reset to
  • offsetX The offset to be reset to along the X axis
  • offsetY The offset to be reset to along the Y axis
  • pixelFormat The pixel format to be reset to
  • pData The image data to reset to

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSave

spinImageSave (
    spinImage hImage,
    const char * pFilename,
    spinImageFileFormat format
) 

Saves an image using a specified file format (using an enum, spinImageFileFormat)

See also: spinError

See also: spinImageFileFormat

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension) @Param format The file format to use to save the image

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSaveBmp

spinImageSaveBmp (
    spinImage hImage,
    const char * pFilename,
    const spinBMPOption * pOption
) 

Saves an image as a BMP image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)
  • pOption The image options related to saving as BMP; includes whether to save as indexed 8-bit

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSaveFromExt

spinImageSaveFromExt (
    spinImage hImage,
    const char * pFilename
) 

Saves an image using a specified file format (using the extension of the filename)

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSaveJpeg

spinImageSaveJpeg (
    spinImage hImage,
    const char * pFilename,
    const spinJPEGOption * pOption
) 

Saves an image as a JPEG image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)
  • pOption The image options related to saving as JPEG; includes quality and whether to save as progressive

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSaveJpg2

spinImageSaveJpg2 (
    spinImage hImage,
    const char * pFilename,
    const spinJPG2Option * pOption
) 

Saves an image as a JPEG 2000 image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)
  • pOption The image options related to saving as JPEG 2000; includes quality

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSavePgm

spinImageSavePgm (
    spinImage hImage,
    const char * pFilename,
    const spinPGMOption * pOption
) 

Saves an image as an PGM image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)
  • pOption The image options related to saving as PGM; includes whether to save as binary

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSavePng

spinImageSavePng (
    spinImage hImage,
    const char * pFilename,
    const spinPNGOption * pOption
) 

Saves an image as a PNG image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)
  • pOption The image options related to saving as PNG; includes compression level and whether to save as interlaced

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSavePpm

spinImageSavePpm (
    spinImage hImage,
    const char * pFilename,
    const spinPPMOption * pOption
) 

Saves an image as a PPM image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)
  • pOption The image options related to saving as PPM; includes whether to save as binary

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinImageSaveTiff

spinImageSaveTiff (
    spinImage hImage,
    const char * pFilename,
    const spinTIFFOption * pOption
) 

Saves an image as a TIFF image

See also: spinError

Parameters:

  • hImage The image to be saved
  • pFilename The filename to use to save the image (with or without the appropriate file extension)
  • pOption The image options related to saving as TIFF; includes compression method

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error