include, src/image: add get_weights operation.