rmagic旋转和背景颜色是黑色的

时间:2013-05-06 12:17:43

标签: rotation background-color rmagick

img1 = Magick::Image.read("public/123.png").first
img1.background_color = "none"

img1.rotate!(30)
img1.write('test.png')

背景颜色是黑色,透明度如何

任何人,帮助吗?

1 个答案:

答案 0 :(得分:1)

img1 = Magick::Image.read("public/123.png").first
img1.background_color = "transparent"

img1.rotate!(30)
img1.write('test.png')