#include "kds_s2000w_debug.h"
#include "kds_s2000w_image_type_check.h"
-int kds_s2000w_image_type_check_is_tiff(blobdata* image)
+uint8_t kds_s2000w_image_type_check_is_tiff(blobdata* image)
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_image_type_check_is_tiff");
char* image_data = (char*) image->data;
- int result = image_data[0] == (char)0x49;
+ uint8_t result = image_data[0] == (char)0x49;
result = result && image_data[1] == (char)0x49;
result = result && image_data[2] == (char)0x2A;
result = result && image_data[3] == (char)0x00;
return result && image_data[3] == (char)0x2A;
}
-int kds_s2000w_image_type_check_is_pnm(blobdata* image)
+uint8_t kds_s2000w_image_type_check_is_pnm(blobdata* image)
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_image_type_check_is_pnm");
return strncmp(image_data, "P4", 2) == 0;
}
-int kds_s2000w_image_type_check_is_jpeg(blobdata* image)
+uint8_t kds_s2000w_image_type_check_is_jpeg(blobdata* image)
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_image_type_check_is_jpeg");
char* image_data = (char*) image->data;
- int result = image_data[0] == (char)0xff;
+ uint8_t result = image_data[0] == (char)0xff;
return result && image_data[1] == (char)0xd8;
}
\ No newline at end of file
#ifndef KDS_S2000W_IMAGE_TYPE_CHECK_H
#define KDS_S2000W_IMAGE_TYPE_CHECK_H
+#include <stdint.h>
#include "kds_s2000w_image_converter.h"
-int kds_s2000w_image_type_check_is_tiff(blobdata* image);
-int kds_s2000w_image_type_check_is_pnm(blobdata* image);
-int kds_s2000w_image_type_check_is_jpeg(blobdata* image);
+uint8_t kds_s2000w_image_type_check_is_tiff(blobdata* image);
+uint8_t kds_s2000w_image_type_check_is_pnm(blobdata* image);
+uint8_t kds_s2000w_image_type_check_is_jpeg(blobdata* image);
#endif
\ No newline at end of file