Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > 0d81a008159b90d5a3553d84969a208b > files > 33

graphicsmagick-doc-1.2.5-2.3mdvmes5.2.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=ibm437">
	<TITLE>Magick::Blob</TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.0  (Win32)">
	<META NAME="AUTHOR" CONTENT="Bob Friesenhahn">
	<META NAME="CREATED" CONTENT="20020805;13502672">
	<META NAME="CHANGEDBY" CONTENT="Bob Friesenhahn">
	<META NAME="CHANGED" CONTENT="20020805;13521508">
	<META NAME="DESCRIPTION" CONTENT="Documentation for Blob class.">
	<META NAME="KEYWORDS" CONTENT="Magick++, GraphicsMagick, Blob">
	<STYLE>
	<!--
		TD P { color: #000000 }
		H1 { color: #000000 }
		P { color: #000000 }
		A:link { color: #0000ff }
		A:visited { color: #ff0000 }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" TEXT="#000000" LINK="#0000ff" VLINK="#ff0000" BGCOLOR="#ffffff">
<H1 ALIGN=CENTER>Magick::Blob</H1>
<P>Blob provides the means to contain any opaque data. It is named
after the term &quot;Binary Large OBject&quot; commonly used to
describe unstructured data (such as encoded images) which is stored
in a database. While the function of Blob is very simple (store a
pointer and and size associated with allocated data), the Blob class
provides some very useful capabilities. In particular, it is fully
reference counted just like the Image class. 
</P>
<P>The Blob class supports value assignment while preserving any
outstanding earlier versions of the object. Since assignment is via a
pointer internally, Blob is efficient enough to be stored directly in
an STL container or any other data structure which requires
assignment. In particular, by storing a Blob in an <A HREF="http://www.sgi.com/tech/stl/AssociativeContainer.html">associative
container</A> (such as STL's '<A HREF="http://www.sgi.com/tech/stl/Map.html"><I>map</I></A>')
it is possible to create simple indexed in-memory &quot;database&quot;
of Blobs. 
</P>
<P>Magick++ currently uses Blob to contain encoded images (e.g. JPEG)
as well as ICC and IPTC profiles. Since Blob is a general-purpose
class, it may be used for other purposes as well. 
</P>
<P STYLE="margin-bottom: 0cm">The methods Blob provides are shown in
the following table: <BR><BR>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><B>Blob Methods</B></P>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=2 CELLSPACING=2>
	<TR>
		<TD>
			<P ALIGN=CENTER><B>Method</B></P>
		</TD>
		<TD>
			<P ALIGN=CENTER><B>Return Type</B></P>
		</TD>
		<TD>
			<P ALIGN=CENTER><B>Signature(s)</B></P>
		</TD>
		<TD>
			<P ALIGN=CENTER><B>Description</B></P>
		</TD>
	</TR>
	<TR>
		<TD ROWSPAN=3>
			<P><A NAME="Blob"></A><FONT SIZE=2>Blob</FONT></P>
		</TD>
		<TD ROWSPAN=3 BGCOLOR="#666666">
			<P><FONT SIZE=2>&nbsp;</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>void</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Default constructor</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P><FONT SIZE=2>const void* data_, size_t length_</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Construct object with data, making a copy of the
			supplied data</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P><FONT SIZE=2>const Blob&amp; blob_</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Copy constructor (reference counted)</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P><A NAME="operator="></A><FONT SIZE=2>operator=</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Blob</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>const Blob&amp; blob_</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Assignment operator (reference counted)</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P><A NAME="update"></A><FONT SIZE=2>update</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>void</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>const void* data_, size_t length_</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Update object contents, making a copy of the
			supplied data. Any existing data in the object is deallocated.</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P><A NAME="data"></A><FONT SIZE=2>data</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>const void*</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>void</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Obtain pointer to data</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P><A NAME="length"></A><FONT SIZE=2>length</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>size_t</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>void</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Obtain data length</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P><A NAME="updateNoCopy"></A><FONT SIZE=2>updateNoCopy</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>void</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>void* data_, size_t length_, Blob::Allocator
			allocator_ = Blob::NewAllocator</FONT></P>
		</TD>
		<TD>
			<P><FONT SIZE=2>Update object contents, using supplied pointer
			directly (no copy) Any existing data in the object is
			deallocated.&nbsp; The user must ensure that the pointer supplied
			is not deleted or otherwise modified after it has been supplied to
			this method. The optional allocator_ parameter allows the user to
			specify if the C (MallocAllocator) or C++ (NewAllocator) memory
			allocation system was used to allocate the memory. The default is
			to use the C++ memory allocator.</FONT></P>
		</TD>
	</TR>
</TABLE>
<P><BR><BR>
</P>
</BODY>
</HTML>