Update of /cvsroot/xconq/xconq/src/include/gdl/media
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13792/d/include/gdl/media
Modified Files:
imf.h img.h
Log Message:
Finish adding GDL deserialization support for GDL image families.
Index: imf.h
===================================================================
RCS file: /cvsroot/xconq/xconq/src/include/gdl/media/imf.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** imf.h 15 May 2006 03:41:10 -0000 1.1
--- imf.h 30 May 2006 02:49:03 -0000 1.2
***************
*** 1,4 ****
// xConq
! // GDL image family lifecycle management and serialization/deserialization.
// $Id$
--- 1,4 ----
// xConq
! // Lifecycle management and ser/deser for GDL image families.
// $Id$
***************
*** 6,10 ****
/*//////////////////////////// COPYRIGHT NOTICE ////////////////////////////////
! Copyright (C) 1992-2000 Stanley T. Shebs
Copyright (C) 2005-2006 Eric A. McDonald
--- 6,11 ----
/*//////////////////////////// COPYRIGHT NOTICE ////////////////////////////////
! Copyright (C) 1989 Stanley T. Shebs
! Copyright (C) 1991-2000 Stanley T. Shebs
Copyright (C) 2005-2006 Eric A. McDonald
***************
*** 28,32 ****
/*! \file
! \brief GDL image family lifecycle management and serialization/deserialization.
\ingroup grp_gdl
*/
--- 29,33 ----
/*! \file
! \brief Lifecycle management and ser/deser for GDL image families.
\ingroup grp_gdl
*/
***************
*** 37,40 ****
--- 38,45 ----
#include "gdl/media/img.h"
+ //! Maximum number of image families to allocate.
+ /*! \todo Should remove these fixed limits. */
+ #define MAXIMAGEFAMILIES 3000
+
NAMESPACE_XCONQ_BEGIN
NAMESPACE_GDL_BEGIN
***************
*** 96,99 ****
--- 101,128 ----
//! Find image family, if it exists, from given name.
extern ImageFamily *find_imf(char *name);
+ //! Given name, find or create image family with that name.
+ extern ImageFamily *get_imf(char *name);
+
+ // Validation
+
+ //! Check if given name is valid for image family.
+ extern int valid_imf_name(char *name);
+
+ // Image Preparation
+
+ //! Compute regions of interest in image data.
+ extern void compute_image_bboxes(ImageFamily *imf);
+
+ // GDL I/O
+
+ //! Read GDL form into GDL image family.
+ /*!
+ Interpret the image family definition as a list of images and/or a
+ notes property.
+ */
+ extern void interp_imf_contents(ImageFamily *imf, Obj *form);
+
+ //! Read GDL image family from GDL form.
+ extern ImageFamily *interp_imf(Obj *form);
NAMESPACE_GDL_END
Index: img.h
===================================================================
RCS file: /cvsroot/xconq/xconq/src/include/gdl/media/img.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** img.h 15 May 2006 03:41:10 -0000 1.1
--- img.h 30 May 2006 02:49:03 -0000 1.2
***************
*** 1,4 ****
// xConq
! // Lifecycle management and serialization/deserialization of GDL images.
// $Id$
--- 1,4 ----
// xConq
! // Lifecycle management and ser/deser of GDL images.
// $Id$
***************
*** 6,10 ****
/*//////////////////////////// COPYRIGHT NOTICE ////////////////////////////////
! Copyright (C) 2006 Eric A. McDonald
//////////////////////////////////// LICENSE ///////////////////////////////////
--- 6,12 ----
/*//////////////////////////// COPYRIGHT NOTICE ////////////////////////////////
! Copyright (C) 1989 Stanley T. Shebs
! Copyright (C) 1991-2000 Stanley T. Shebs
! Copyright (C) 2005-2006 Eric A. McDonald
//////////////////////////////////// LICENSE ///////////////////////////////////
***************
*** 27,31 ****
/*! \file
! \brief Lifecycle management and serialization/deserialization of GDL images.
\ingroup grp_gdl
*/
--- 29,33 ----
/*! \file
! \brief Lifecycle management and ser/deser of GDL images.
\ingroup grp_gdl
*/
***************
*** 36,39 ****
--- 38,55 ----
#include "gdl/lisp.h"
+ // Function Macros
+
+ //! How many bytes per row in image data?
+ #define computed_rowbytes(w, pixelsize) (((w * pixelsize) + 7) / 8)
+
+ //! Convert hexadecimal digit to decimal number.
+ #define hextoi(c) (((c) >= '0' && (c) <= '9') ? ((c) - '0') : ((c) - 'a' + 10))
+
+ // Iterator Macros
+
+ //! Iterate over all images in GDL image family.
+ #define for_all_images(imf,img) \
+ for ((img) = (imf)->images; (img) != NULL; (img) = (img)->next)
+
NAMESPACE_XCONQ_BEGIN
NAMESPACE_GDL_BEGIN
***************
*** 167,170 ****
--- 183,213 ----
} Image;
+ // Global Variables: Behavior Modifiers
+
+ //! Flag that indicates limited GDI memory in certain versions of Windows.
+ extern short poor_memory;
+
+ // Queries
+
+ //! Get or create image of given specs from given image family.
+ extern Image *get_img(struct a_image_family *imf, int w, int h);
+
+ // Image Preparation
+
+ //! Compute region of interest in GDL image data.
+ extern void compute_image_bbox(Image *img);
+
+ // GDL I/O
+
+ //! Read GDL image from GDL forms.
+ /*!
+ Given an image family, a size, and a list describing the elements
+ of a single image, parse the size and elements, put those into the
+ right slots of an image object. Also detect and warn about changes
+ to an existing image, since this usually indicates some kind of
+ problem.
+ */
+ extern void interp_image(struct a_image_family *imf, Obj *size, Obj *parts);
+
NAMESPACE_GDL_END
NAMESPACE_XCONQ_END
|