swap x-y size for library call