Using batch convert/automatic crop with transparent backgrounds

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Post Reply
mikecode
Posts: 1
Joined: Tue Nov 24, 2020 1:55 pm

Using batch convert/automatic crop with transparent backgrounds

Post by mikecode »

I have a bunch of 400x400 images that I potentially need to crop, if they have extra white space. `RPGCharacter-12.png` is an example of a file that should be cropped. `PixelGrad-01.png` should not be cropped as there is no transparent space around it. I'm unsure of the best way to proceed. When I choose the Automatic Crop action, I can use either the pixel color from one corner or a specified color. The result files attached are from the first option. The RPG character (and most others) came out perfect! The unintended consequence with the gradient file is that it removes the top ~50 pixels. It seems like specifying a "color" would be better but there doesn't seem to be a way to choose "transparent" here. Any advice?

I'm using XnViewMP Mac OSX Version 0.97.1

Thanks!
Attachments
PixelGrad-01_result.png
PixelGrad-01_result.png (7.28 KiB) Viewed 456 times
RPGCharacter-12_result.png
RPGCharacter-12_result.png (22.45 KiB) Viewed 456 times
PixelGrad-01.png
PixelGrad-01.png (7.16 KiB) Viewed 456 times
RPGCharacter-12.png
RPGCharacter-12.png (21.4 KiB) Viewed 456 times
User avatar
xnview
Author of XnView
Posts: 34357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Using batch convert/automatic crop with transparent backgrounds

Post by xnview »

you can choose black as color
Pierre.
Post Reply