Page 1 of 1

Problem rotate to .png

Posted: 2013-04-10T11:51:10-07:00
by VladimirR

Code: Select all

convert.exe tmp3.png -rotate 30 rotate.png
This command rotates the image, but the image boundaries are after rotation not identical with the layer boundary. Observed in version 6.8.3 and 6.8.4, both version Windows x32 and x64.

Rotate to another format (I tested .jpg and .gif) works without layer moving.

Old version 6.6.4 works without any problems, other versions I do not know.

Image

(Sorry for my English)

Re: Problem rotate to .png

Posted: 2013-04-10T12:22:59-07:00
by snibgo
You can use "+repage":

Code: Select all

convert.exe tmp3.png -rotate 30 +repage rotate.png

Re: Problem rotate to .png

Posted: 2013-04-10T18:41:39-07:00
by anthony
That just essentially removes the 'offset' of the rotated image.

-rotate is probably not using Distort correctly. This was a relativity recent change.

It should be calling SRT 0 with no virtual (+distort) flag.

Re: Problem rotate to .png

Posted: 2013-04-11T10:36:55-07:00
by VladimirR
snibgo wrote:You can use "+repage":

Code: Select all

convert.exe tmp3.png -rotate 30 +repage rotate.png
Thank you, it works. As a fallback solution is sufficient.

Re: Problem rotate to .png

Posted: 2013-04-11T18:51:56-07:00
by anthony
Okay rotate does seem to be working correct. Though it does seem to try and preserve the images virtual offset for a rotation of the image about the image's 'center' point. That means the a typical image may end up with a negative offset.

This can be good (for image layering) and back (when not image layering) but the solution

In that it is equivalent to
-virtual-pixel background +distort SRT {angle}