summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5/hdf2gif.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-11 14:39:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-11 14:39:08 (GMT)
commit5c97dbe59f1ea27dc66e46d4aaa676006abf9bae (patch)
tree88700302850919c523aece7460a92bf5d3fbc7ee /hl/tools/gif2h5/hdf2gif.c
parent6b670e353c1ea7f13ef72cc4297d9973102078bb (diff)
parent51e799551309e16558297469edef6e2d232a3246 (diff)
downloadhdf5-5c97dbe59f1ea27dc66e46d4aaa676006abf9bae.zip
hdf5-5c97dbe59f1ea27dc66e46d4aaa676006abf9bae.tar.gz
hdf5-5c97dbe59f1ea27dc66e46d4aaa676006abf9bae.tar.bz2
Merge pull request #2118 in HDFFV/hdf5 from ~BYRN/hdf5_merge_adb:develop to develop
* commit '51e799551309e16558297469edef6e2d232a3246': HDFFV-10974 Change defines to eliminate Windows conflict
Diffstat (limited to 'hl/tools/gif2h5/hdf2gif.c')
-rw-r--r--hl/tools/gif2h5/hdf2gif.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c
index ae63e92..e32facb 100644
--- a/hl/tools/gif2h5/hdf2gif.c
+++ b/hl/tools/gif2h5/hdf2gif.c
@@ -45,20 +45,20 @@ usage(void)
FILE *fpGif = NULL;
int main(int argc , char **argv)
{
- BYTE *Image;
+ GIFBYTE *Image;
void *edata;
H5E_auto2_t func;
/* compression structs */
- CHAR *HDFName = NULL;
- CHAR *GIFName = NULL;
+ GIFCHAR *HDFName = NULL;
+ GIFCHAR *GIFName = NULL;
- BYTE* b;
+ GIFBYTE* b;
- BYTE GlobalPalette[256][3];
- BYTE Red[256];
- BYTE Green[256];
- BYTE Blue[256];
+ GIFBYTE GlobalPalette[256][3];
+ GIFBYTE Red[256];
+ GIFBYTE Green[256];
+ GIFBYTE Blue[256];
int RWidth, RHeight;
int ColorMapSize, InitCodeSize, Background, BitsPerPixel;
@@ -66,7 +66,7 @@ int main(int argc , char **argv)
int i;
int numcols = 0;
- BYTE pc2nc[256] , r1[256] , g1[256] , b1[256];
+ GIFBYTE pc2nc[256] , r1[256] , g1[256] , b1[256];
int arg_index = 2;
int bool_is_image = 0; /* 0 = false , 1 = true */
@@ -110,7 +110,7 @@ int main(int argc , char **argv)
{
/* allocate space to store the image name */
size_t len = strlen(argv[arg_index]);
- image_name = (CHAR*) malloc( len + 1);
+ image_name = (GIFCHAR*) malloc( len + 1);
strcpy(image_name , argv[arg_index]);
bool_is_image = 0;
@@ -125,7 +125,7 @@ int main(int argc , char **argv)
/* Do Endian Order testing and set Endian Order */
idx = 0x0001;
- b = (BYTE *) &idx;
+ b = (GIFBYTE *) &idx;
EndianOrder = (b[0] ? 1:0);
if (!(fpGif = fopen(GIFName , "wb")))
@@ -164,7 +164,7 @@ int main(int argc , char **argv)
goto out;
}
- Image = (BYTE*) malloc( (size_t) width * (size_t) height );
+ Image = (GIFBYTE*) malloc( (size_t) width * (size_t) height );
if ( H5IMread_image( fid, image_name, Image ) < 0 )
goto out;
@@ -174,7 +174,7 @@ int main(int argc , char **argv)
if ( H5IMget_palette_info( fid, image_name, 0, pal_dims ) < 0 )
goto out;
- pal = (BYTE*) malloc( (size_t) pal_dims[0] * (size_t) pal_dims[1] );
+ pal = (GIFBYTE*) malloc( (size_t) pal_dims[0] * (size_t) pal_dims[1] );
if ( H5IMget_palette( fid, image_name, 0, pal ) < 0 )
goto out;
@@ -211,9 +211,9 @@ int main(int argc , char **argv)
numcols = 256;
for (i = 0 ; i < numcols ; i++)
{
- Red[i] = (BYTE)(255 - i);
- Green[i] = (BYTE)(255 - i);
- Blue[i] = (BYTE)(255 - i);
+ Red[i] = (GIFBYTE)(255 - i);
+ Green[i] = (GIFBYTE)(255 - i);
+ Blue[i] = (GIFBYTE)(255 - i);
}
}
else
@@ -246,7 +246,7 @@ int main(int argc , char **argv)
if (j==i)
{
/* wasn't found */
- pc2nc[i] = (BYTE)nc;
+ pc2nc[i] = (GIFBYTE)nc;
r1[nc] = Red[i];
g1[nc] = Green[i];
b1[nc] = Blue[i];