[brlcad-commits] SF.net SVN: brlcad:[56305] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <moh...@us...> - 2013-07-29 04:13:56
|
Revision: 56305 http://sourceforge.net/p/brlcad/code/56305 Author: mohitdaga Date: 2013-07-29 04:13:50 +0000 (Mon, 29 Jul 2013) Log Message: ----------- Converting ICV_IMAGE_FILE_MAGIC to ICV_IMAGE_MAGIC. Modified Paths: -------------- brlcad/trunk/include/icv.h brlcad/trunk/include/magic.h brlcad/trunk/src/libicv/fileformat.c Modified: brlcad/trunk/include/icv.h =================================================================== --- brlcad/trunk/include/icv.h 2013-07-29 04:08:36 UTC (rev 56304) +++ brlcad/trunk/include/icv.h 2013-07-29 04:13:50 UTC (rev 56305) @@ -106,13 +106,13 @@ /** * asserts the integrity of a icv_image_file struct. */ -#define ICV_CK_IMAGE(_i) ICV_CKMAG(_i, ICV_IMAGE_FILE_MAGIC, "icv_image") +#define ICV_CK_IMAGE(_i) ICV_CKMAG(_i, ICV_IMAGE_MAGIC, "icv_image") /** * initializes a icv_image_file struct without allocating any memory. */ #define ICV_IMAGE_INIT(_i) { \ - (_i)->magic = ICV_IMAGE_FILE_MAGIC; \ + (_i)->magic = ICV_IMAGE_MAGIC; \ (_i)->width = (_i)->height = (_i)->channels = (_i)->alpha_channel = 0; \ (_i)->gamma_corr = 0.0; \ (_i)->data = NULL; \ @@ -122,7 +122,7 @@ /** * returns truthfully whether a icv_image_file has been initialized. */ -#define ICV_IMAGE_IS_INITIALIZED(_i) (((struct icv_image *)(_i) != ICV_IMAGE_NULL) && LIKELY((_i)->magic == ICV_IMAGE_FILE_MAGIC)) +#define ICV_IMAGE_IS_INITIALIZED(_i) (((struct icv_image *)(_i) != ICV_IMAGE_NULL) && LIKELY((_i)->magic == ICV_IMAGE_MAGIC)) /** * Finds the Image format based on heuristics depending on the file name. Modified: brlcad/trunk/include/magic.h =================================================================== --- brlcad/trunk/include/magic.h 2013-07-29 04:08:36 UTC (rev 56304) +++ brlcad/trunk/include/magic.h 2013-07-29 04:13:50 UTC (rev 56305) @@ -213,7 +213,7 @@ #define WDB_METABALLPT_MAGIC 0x6d627074 /**< mbpt */ #define WDB_PIPESEG_MAGIC 0x9723ffef /**< ?#?? */ #define WMEMBER_MAGIC 0x43128912 /**< C??? */ -#define ICV_IMAGE_FILE_MAGIC 0x6269666d /**< bifm */ +#define ICV_IMAGE_MAGIC 0x6269666d /**< bifm */ #endif /* __MAGIC_H__ */ Modified: brlcad/trunk/src/libicv/fileformat.c =================================================================== --- brlcad/trunk/src/libicv/fileformat.c 2013-07-29 04:08:36 UTC (rev 56304) +++ brlcad/trunk/src/libicv/fileformat.c 2013-07-29 04:13:50 UTC (rev 56305) @@ -353,7 +353,7 @@ ICV_IMAGE_INIT(bif); bif->data = uchar2double(data,size); bu_free(data, "pix_load : unsigned char data"); - bif->magic = ICV_IMAGE_FILE_MAGIC; + bif->magic = ICV_IMAGE_MAGIC; bif->height = height; bif->width = width; bif->channels = 3; @@ -392,7 +392,7 @@ ICV_IMAGE_INIT(bif); bif->data = uchar2double(data,size); bu_free(data, "bw_load : unsigned char data"); - bif->magic = ICV_IMAGE_FILE_MAGIC; + bif->magic = ICV_IMAGE_MAGIC; bif->height = height; bif->width = width; bif->channels = 1; @@ -507,6 +507,7 @@ bif->height = height; bif->color_space = color_space; bif->alpha_channel = 0; + bif->magic = ICV_IMAGE_MAGIC; switch(color_space) { case ICV_COLOR_SPACE_RGB : /* Add all the other three channel images here (eg. HSV, YCbCr etc.) */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |