Thanks to all guys, all your commands works! Because some of my pngs are not square, so I modify snibgo's command a little.
magick lBW9I.png ( +clone -trim -set option:NTRIM %[fx:min(min(page.x,page.width-w-page.x),min(page.y,page.height-h-page.y)*page.width/page.height)]x%[fx:min(min(page.y,page ...
Search found 4 matches
- 2018-05-09T04:58:24-07:00
- Forum: Users
- Topic: How to trim a png with ImageMigick convert tool, and keep all things same distance to original center?
- Replies: 8
- Views: 8003
- 2018-05-08T05:19:11-07:00
- Forum: Users
- Topic: How to trim a png with ImageMigick convert tool, and keep all things same distance to original center?
- Replies: 8
- Views: 8003
Re: How to trim a png with ImageMigick convert tool, and keep all things same distance to original center?

My IM version in window7 is V7.0.7-31, in ubuntu is V6.7.7-10, so, both version I have. But I prefer with linux shell script than dos, if V7 is good at do this staff, maybe I should update the ubuntu IM Version.
Thank you for your attention.
- 2018-05-08T03:06:55-07:00
- Forum: Users
- Topic: How to trim a png with ImageMigick convert tool, and keep all things same distance to original center?
- Replies: 8
- Views: 8003
Re: How to trim a png with ImageMigick convert tool, and keep all things same distance to original center?
The original file has a black dot in center, and some transparency at top, right, bottom, and left. I want to trim transparency as much as I can, while keep the original ratio aspect, and part's distance to center, after trim, the black dot should still in the center. But with command I post, after ...
- 2018-05-08T02:07:39-07:00
- Forum: Users
- Topic: How to trim a png with ImageMigick convert tool, and keep all things same distance to original center?
- Replies: 8
- Views: 8003
How to trim a png with ImageMigick convert tool, and keep all things same distance to original center?
I have a png with some transparency at board, and I want to trim the transparency, and keep every thing with same distance to the original center.
The original
https://i.stack.imgur.com/In3um.png
The result I want.
https://i.stack.imgur.com/NwlfX.png
The result with command convert original.png ...
The original
https://i.stack.imgur.com/In3um.png
The result I want.
https://i.stack.imgur.com/NwlfX.png
The result with command convert original.png ...