Feature request: Auto-crop image

Ideas for improvements and requests for new features in XnView MP

Moderators: helmut, XnTriq, xnview

Post Reply
magick
Posts: 9
Joined: Sat Dec 11, 2010 10:37 am

Feature request: Auto-crop image

Post by magick »

The only reason I still have IrfanView installed (therefore limited to win32 sandbox)…

I can think of two possible extension options:
- trim from selected frames only (top, bottom, left, right)
- trim when pattern changes (rather than detecting first if pixels adjacent to the frame have the same color and then detecting how wide the same area towards the centre is - this would be detecting just the break in the pattern so therefore could support multiple different colors initially adjacent to the frame. For instance, image:

Code: Select all

RRRRRGGGRRRRRRRR
RRRRRGGGRRRRRRRR
RRRRRGGGRRRRRRRR
RRRRBGGRRRRRRRRR
RRRRBGGRRRRRRRRR
RRRBBBGGRRRRRRRR
RRBBBGGGGRGRRRRR
RBBBBBBRRRRRRRRR
would result in:

Code: Select all

RRRRBGGRRRRRRRRR
RRRRBGGRRRRRRRRR
RRRBBBGGRRRRRRRR
RRBBBGGGGRGRRRRR
RBBBBBBRRRRRRRRR
when crop from top only.

and in:

Code: Select all

 RRBBBGGRRR
 RBBBGGGGRG
 BBBBBBRRRR
when crop from all directions.

whereas default trim (like in IrfanView) would result in:

Code: Select all

 RRRRGGGRRR
 RRRRGGGRRR
 RRRRGGGRRR
 RRRBGGRRRR
 RRRBGGRRRR
 RRBBBGGRRR
 RBBBGGGGRG
 BBBBBBRRRR
(just left & right as those had one a same R-color adjacent to the frame initally)
Post Reply