Skip to content

Commit c3000be

Browse files
Change datatype to uint8
1 parent f67c422 commit c3000be

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

image_def.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#ifndef IMAGEDEF_H
2929
#define IMAGEDEF_H
3030

31+
#include <stdint.h>
32+
3133
#define destroyImage(im) {free((im)->pData); (im)->pData = NULL;}
3234

3335
/* Color spaces OMX-Components support */
@@ -37,7 +39,7 @@
3739
#define COLOR_SPACE_RGB16 3
3840

3941
typedef struct IMAGE{
40-
char *pData; /* Image pixel data */
42+
uint8_t* pData; /* Image pixel data */
4143
size_t nData; /* Alloc data length */
4244

4345
unsigned int width;
@@ -51,7 +53,7 @@ typedef struct ANIM_IMAGE{
5153
unsigned int decodeCount;
5254
unsigned int frameNum;
5355

54-
unsigned char* imData;
56+
uint8_t* imData;
5557
size_t size;
5658

5759
void* pExtraData;

soft_image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ int softDecodeBMP(FILE *fp, IMAGE* bmpImage, unsigned char** data, size_t size){
319319
goto cleanup;
320320
}
321321

322-
char* bmpData = bmp.bitmap;
322+
uint8_t* bmpData = bmp.bitmap;
323323
int bmpWidth = bmp.width;
324324

325325
bmpImage->height = bmp.height;

0 commit comments

Comments
 (0)