19
19
The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
21
Portions created by the Initial Developer are Copyright (C) 2012
21
Portions created by the Initial Developer are Copyright (C) 2012-2015
22
22
the Initial Developer. All Rights Reserved.
67
67
unsigned char *p_blob = NULL;
71
71
if (sqlite3_value_type (argv[0]) != SQLITE_BLOB)
73
sqlite3_result_error(context, "gpkgGetImageType() error: argument 1 [image blob] is not of the BLOB type", -1);
73
sqlite3_result_error (context,
74
"gpkgGetImageType() error: argument 1 [image blob] is not of the BLOB type",
76
78
p_blob = (unsigned char *) sqlite3_value_blob (argv[0]);
77
79
n_bytes = sqlite3_value_bytes (argv[0]);
79
blobType = gaiaGuessBlobType(p_blob, n_bytes);
81
blobType = gaiaGuessBlobType (p_blob, n_bytes);
83
sqlite3_result_text(context, "tiff", strlen("tiff"), SQLITE_TRANSIENT);
86
sqlite3_result_text(context, "png", strlen("png"), SQLITE_TRANSIENT);
89
sqlite3_result_text(context, "jpeg", strlen("jpeg"), SQLITE_TRANSIENT);
92
sqlite3_result_text(context, "x-webp", strlen("x-webp"), SQLITE_TRANSIENT);
95
sqlite3_result_text(context, "unknown", strlen("unknown"), SQLITE_TRANSIENT);
85
sqlite3_result_text (context, "tiff", strlen ("tiff"),
89
sqlite3_result_text (context, "png", strlen ("png"),
93
sqlite3_result_text (context, "jpeg", strlen ("jpeg"),
97
sqlite3_result_text (context, "x-webp", strlen ("x-webp"),
101
sqlite3_result_text (context, "unknown", strlen ("unknown"),