Heavier checking of the structures prior to calling liq_image_quantize_2.