利用ruby+rmagick对图片进行处理, 现有png图片若干,背景为透明色的. 每张图片都有很多的白边,并且这些白边是没有用的. 存在就是浪费资源.想问问大家有没有什么好的方法来处理这个白边.这样的话就会节约些资源
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
If you want to automatically recognize the white edges, you may have to write your own recognition algorithm. ImageMagick doesn't have much support for such needs.
Yes, img_obj.trim(!)
Try it with crop
If you want to automatically recognize the white edges, you may have to write your own recognition algorithm. ImageMagick doesn't have much support for such needs.
Yes, img_obj.trim(!)
Try it with crop