Bug related to macro IS_INSIDE_IMAGE solved.