How to Auto Crop Transparent space?

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

Moderators: XnTriq, helmut, xnview

Post Reply
kopox
Posts: 5
Joined: Wed Jan 27, 2021 7:29 pm

How to Auto Crop Transparent space?

Post 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.
Attachments
A-hunter-lives-here-13444099-001.png
02 papa the man the myth the racer the legend.png
01.png
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to Auto Crop Transparent space?

Post by xnview »

do you have tried Batch convert - automatic crop?
Pierre.
kopox
Posts: 5
Joined: Wed Jan 27, 2021 7:29 pm

Re: How to Auto Crop Transparent space?

Post 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
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How to Auto Crop Transparent space?

Post 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.
tesagk
Posts: 3
Joined: Sun Mar 12, 2023 11:07 pm

Re: How to Auto Crop Transparent space?

Post 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
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to Auto Crop Transparent space?

Post by xnview »

could you post the image file?
Pierre.
tesagk
Posts: 3
Joined: Sun Mar 12, 2023 11:07 pm

Re: How to Auto Crop Transparent space?

Post 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 1378 times
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to Auto Crop Transparent space?

Post by xnview »

if you use 'Color of pixel at'?
Pierre.
tesagk
Posts: 3
Joined: Sun Mar 12, 2023 11:07 pm

Re: How to Auto Crop Transparent space?

Post by tesagk »

xnview wrote: Tue Mar 14, 2023 7:33 am if you use 'Color of pixel at'?
🤦‍♂️That did it, thank you.
Post Reply