gi-gdkpixbuf-2.0.11: GdkPixbuf bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GdkPixbuf.Structs.Pixdata

Contents

Description

A Pixdata contains pixbuf information in a form suitable for serialization and streaming.

Synopsis

Exported types

newtype Pixdata Source #

Constructors

Pixdata (ManagedPtr Pixdata) 

Instances

newZeroPixdata :: MonadIO m => m Pixdata Source #

Construct a Pixdata struct initialized to zero.

Methods

deserialize

pixdataDeserialize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Pixdata

pixdata: a Pixdata structure to be filled in.

-> ByteString

stream: stream of bytes containing a serialized Pixdata structure.

-> m ()

(Can throw GError)

Deprecated: (Since version 2.32)Use Resource instead.

Deserializes (reconstruct) a Pixdata structure from a byte stream. The byte stream consists of a straightforward writeout of the Pixdata fields in network byte order, plus the pixelData bytes the structure points to. The pixdata contents are reconstructed byte by byte and are checked for validity. This function may fail with PixbufErrorCorruptImage or PixbufErrorUnknownType.

serialize

pixdataSerialize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Pixdata

pixdata: a valid Pixdata structure to serialize.

-> m ByteString

Returns: A newly-allocated string containing the serialized Pixdata structure.

Deprecated: (Since version 2.32)Use Resource instead.

Serializes a Pixdata structure into a byte stream. The byte stream consists of a straightforward writeout of the Pixdata fields in network byte order, plus the pixelData bytes the structure points to.

toCsource

pixdataToCsource Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Pixdata

pixdata: a Pixdata to convert to C source.

-> Text

name: used for naming generated data structures or macros.

-> [PixdataDumpType]

dumpType: a PixdataDumpType determining the kind of C source to be generated.

-> m String

Returns: a newly-allocated string containing the C source form of pixdata.

Deprecated: (Since version 2.32)Use Resource instead.

Generates C source code suitable for compiling images directly into programs.

gdk-pixbuf ships with a program called [gdk-pixbuf-csource][gdk-pixbuf-csource], which offers a command line interface to this function.

Properties

height

length

magic

pixdataType

pixelData

rowstride

width