I have something really weird happening: after some complicated commands, involving composing, I end up with an image in the middle of a transparent background and I store this in a PNG file. Fine. Then I use a separate convert command, performing some cropping and extenting and produce a new PNG file. Everything works great so far.
Now here is the problem: if I put together both series of commands in the same 'convert' pipeline, I see some clipping occurring in the final image. So my theory is that there is some kind of clipping info that gets trashed when I am saving the first series into a PNG file, but that this clipping info is still active when I combine the two converts into one.
I looked at the -clip option, but did not find how to remove (or disable) a clipping path. How do you remove it?
Help!
Thanks in advance,
Yann
How to remove a clipping path?
Re: How to remove a clipping path?
Add +repage to your command line to remove the virtual canvas. In case you are right about clipping, add -strip to your command line to remove any clipping paths / masks.
Re: How to remove a clipping path?
I knew about +repage, but did not know about -strip, this is good to know! Thanks!
After some more work, I finally found the origin of my problem: in the first part of the pipeline, that was a -gravity center command that had obviously an enduring side-effect all the way through. I was not aware that cropping and extending could be affected by gravity even if you specify the offset values.
Anyway, I inserted a -gravity none, and it fixed it.
I will keep as a rule of thumb that after doing operations using gravity (like rotation...), it is a good idea to turn it back off to avoid side effects.
Thanks again for the quick response!
Yann
After some more work, I finally found the origin of my problem: in the first part of the pipeline, that was a -gravity center command that had obviously an enduring side-effect all the way through. I was not aware that cropping and extending could be affected by gravity even if you specify the offset values.
Anyway, I inserted a -gravity none, and it fixed it.
I will keep as a rule of thumb that after doing operations using gravity (like rotation...), it is a good idea to turn it back off to avoid side effects.
Thanks again for the quick response!
Yann