Page 1 of 1

How to Auto Crop Transparent space?

Posted: Thu Jul 22, 2021 6:49 pm
by kopox
hi guys i have a lot of images with transparent background, and also transparent space around the image.
how to crop that transparent space around the image using batch auto crop tool?

here also i attach some files as a file example.

thank you guys.

Re: How to Auto Crop Transparent space?

Posted: Tue Jul 27, 2021 11:29 am
by xnview
do you have tried Batch convert - automatic crop?

Re: How to Auto Crop Transparent space?

Posted: Wed Jul 28, 2021 5:21 pm
by kopox
yes, but if the image has white color, it will cropped the image the image, not only the transparent space.

like this image it will only leave the black image on the center, and cropped the white text when use automatic crop. the image has white text surrounding the image if you open it.
218. Best Dad T-Shirt Design-002.png

Re: How to Auto Crop Transparent space?

Posted: Wed Jul 28, 2021 6:39 pm
by cday
I get the following result with these settings:

Screenshot .png

But I have always found 'Automatic crop' difficult to understand, and in other XnView software have sometimes had to use surprisingly large tolerance values. In the above image with those settings I don't see the expected cropping to the outline of the white text.

Edit:

Tested in XnConvert 1.92, XnView MP 0.98.4 is similar, note that a bug related to transparency has recently been corrected in both softwares.

Re: How to Auto Crop Transparent space?

Posted: Mon Mar 13, 2023 3:11 am
by tesagk
Sorry for necroing, but I can't seem to get XnView MP to auto crop transparent space at all. I don't even have white to deal with, which maybe is the problem? This is the result I get in any case:
scrn-XnView_Transparency-Crop.png
scrn-XnView_Transparency-Settings.png

Re: How to Auto Crop Transparent space?

Posted: Mon Mar 13, 2023 7:59 am
by xnview
could you post the image file?

Re: How to Auto Crop Transparent space?

Posted: Mon Mar 13, 2023 10:14 pm
by tesagk
xnview wrote: Mon Mar 13, 2023 7:59 am could you post the image file?
This is the source file:
Sarcophagus_Stone_Sandstone_Lid_Cracked_A2_2x3.png
Sarcophagus_Stone_Sandstone_Lid_Cracked_A2_2x3.png (161.37 KiB) Viewed 2801 times

Re: How to Auto Crop Transparent space?

Posted: Tue Mar 14, 2023 7:33 am
by xnview
if you use 'Color of pixel at'?

Re: How to Auto Crop Transparent space?

Posted: Sat Mar 18, 2023 1:22 am
by tesagk
xnview wrote: Tue Mar 14, 2023 7:33 am if you use 'Color of pixel at'?
🤦‍♂️That did it, thank you.