{"action":"created","issue":{"url":"https://api.github.com/repos/gographics/imagick/issues/105","repository_url":"https://api.github.com/repos/gographics/imagick","labels_url":"https://api.github.com/repos/gographics/imagick/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/gographics/imagick/issues/105/comments","events_url":"https://api.github.com/repos/gographics/imagick/issues/105/events","html_url":"https://github.com/gographics/imagick/issues/105","id":189573197,"number":105,"title":"How to rotate a image?","user":{"login":"skyleelove","id":18411957,"avatar_url":"https://avatars.githubusercontent.com/u/18411957?v=3","gravatar_id":"","url":"https://api.github.com/users/skyleelove","html_url":"https://github.com/skyleelove","followers_url":"https://api.github.com/users/skyleelove/followers","following_url":"https://api.github.com/users/skyleelove/following{/other_user}","gists_url":"https://api.github.com/users/skyleelove/gists{/gist_id}","starred_url":"https://api.github.com/users/skyleelove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyleelove/subscriptions","organizations_url":"https://api.github.com/users/skyleelove/orgs","repos_url":"https://api.github.com/users/skyleelove/repos","events_url":"https://api.github.com/users/skyleelove/events{/privacy}","received_events_url":"https://api.github.com/users/skyleelove/received_events","type":"User","site_admin":false},"labels":[{"id":37944763,"url":"https://api.github.com/repos/gographics/imagick/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-16T03:24:36Z","updated_at":"2016-11-16T04:01:30Z","closed_at":null,"body":"Hi,\r\n\r\n   I want to rotate a image 15°,how i can do ?Thank you very much."},"comment":{"url":"https://api.github.com/repos/gographics/imagick/issues/comments/260848083","html_url":"https://github.com/gographics/imagick/issues/105#issuecomment-260848083","issue_url":"https://api.github.com/repos/gographics/imagick/issues/105","id":260848083,"user":{"login":"skyleelove","id":18411957,"avatar_url":"https://avatars.githubusercontent.com/u/18411957?v=3","gravatar_id":"","url":"https://api.github.com/users/skyleelove","html_url":"https://github.com/skyleelove","followers_url":"https://api.github.com/users/skyleelove/followers","following_url":"https://api.github.com/users/skyleelove/following{/other_user}","gists_url":"https://api.github.com/users/skyleelove/gists{/gist_id}","starred_url":"https://api.github.com/users/skyleelove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyleelove/subscriptions","organizations_url":"https://api.github.com/users/skyleelove/orgs","repos_url":"https://api.github.com/users/skyleelove/repos","events_url":"https://api.github.com/users/skyleelove/events{/privacy}","received_events_url":"https://api.github.com/users/skyleelove/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T04:01:30Z","updated_at":"2016-11-16T04:01:30Z","body":"Hi,\r\n I tried to use RotateImage（）like this:\r\n\r\nn := imagick.NewMagickWand()\r\n\t\terr := n.SetSize(2000, 2000)\r\n\t\tif err != nil {\r\n\t\t\treturn err\r\n\t\t}\r\n\t\terr = n.SetResolution(2000, 2000)\r\n\t\tif err != nil {\r\n\t\t\treturn err\r\n\t\t}\r\n\t\tpixel := imagick.NewPixelWand()\r\n\t\tpixel.SetColor(\"transparent\")\r\n\t\terr = n.SetBackgroundColor(pixel)\r\n\t\tif err != nil {\r\n\t\t\treturn err\r\n\t\t}\r\n\t\tn.SetFormat(\"png\")\r\n\t\tfor x := 0; x < int(n.GetImageWidth()); x += int(n.GetImageWidth()) >> 2 {\r\n\t\t\tfor y := 0; y < int(n.GetImageHeight()); y += int(n.GetImageHeight()) >> 2 {\r\n\t\t\t\tn.CompositeImage(w.watermark, imagick.COMPOSITE_OP_ATOP, x, y)\r\n\t\t\t}\r\n\t\t}\r\n\t\terr = n.RotateImage(pixel, 15)\r\n\t\tfmt.Println(err)\r\n\t\tif err != nil {\r\n\t\t\treturn err\r\n\t\t}\r\n\t\tif dest.GetFormat() == \"png\" {\r\n\t\t\tdest.CompositeImage(n, imagick.COMPOSITE_OP_ATOP, 0, 0)\r\n\t\t} else {\r\n\r\n\t\t\tdest.CompositeImage(n, imagick.COMPOSITE_OP_BLEND, 0, 0)\r\n\t\t}\r\n\r\nbut I get this err\r\nERROR_WAND: wand contains no images `MagickWand-4' @ error/magick-image.c/MagickRotateImage/9194\r\n\r\nCould you give a example to show how to use RotateImage()\r\nThank you very much!"}}
{"actor":{"display_login":"skyleelove"}}