if(!jpeg_load(filename, (unsigned char**)&data, &width, &height)) {
msg("<error> Couldn't load image %s", filename);
return 0;
if(!jpeg_load(filename, (unsigned char**)&data, &width, &height)) {
msg("<error> Couldn't load image %s", filename);
return 0;