#include #include #include "spatial_image.h" int main(void){ (void)layout_from_json; unsigned char regions[16][3];for(unsigned i=0;i<16;i++){regions[i][0]=11;regions[i][1]=22;regions[i][2]=33;} char *command=spatial_image_command(regions,149);assert(command); assert(strstr(command,"\"command\":\"image\"") && strstr(command,"\"priority\":149") && strstr(command,"\"format\":\"rgb\"")); const char *encoded=strstr(command,"\"imagedata\":\"")+13; for(unsigned i=0;i>4);actual[1]=(v[1]<<4)|(v[2]>>2);actual[2]=(v[2]<<6)|v[3];assert(!memcmp(expected,actual,3));free(command); puts("PASS: image command, exact neutral RGB base64, spatial edge differences and cached geometry");return 0; }