get image colorspace, fix 3rdparty linking, other minor.