I want to rotate PNG file by convert command. like this.
convert -background 'rgba(0,0,0,0.5)' -rotate 45 1.png r1.png
But result PNG file is wrong like following. https://docs.google.com/spreadsheet/ccc?key=0AqzGWe_mT6dwdEIwa04xRldwVGtOX1VGbVJhRnZwX0E
The gray space is correct.
I don't know why black space exists.
What am I wrong?
thank you.
convert -version Version: ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP http://www.imagemagick.org Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
The simplest way to do this is using convert function. Let us say you want to rotate file image. jpg by 90 degrees (counterclockwise). The above command will rotate image.
The imutils. rotate() function is used to rotate an image by an angle in Python.
The image to modify comes straight after convert.
Try:
convert 1.png -background "rgba(0,0,0,0.5)" -rotate 45 r1.png
This worked for me
$ convert 1.png -distort SRT -ANGLE_IN_DEGREES -gravity center r1.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With