Best resize and or crop logic

て烟熏妆下的殇ゞ 提交于 2019-11-30 20:51:09

I'd say you should utilize standard geometry types like Rectangle and Size. Then you should probably also support a use case, when the caller wants to fit the image in some larger rectangle, but still wants to keep the original image sizes ratio.

One way to implement the resizing you can find here.

This is probably a bit more involved than what you need, but for an example of some advanced cropping techniques, check this out.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!