diff options
author | Henning Makholm <henning@makholm.net> | 2006-02-21 18:00:00 (EST) |
---|---|---|
committer | Julien Jorge <julien.jorge@stuff-o-matic.com> | 2013-01-10 16:06:36 (EST) |
commit | 27f6ea800cfd66b1024b0379aa1ac9631e799ee7 (patch) | |
tree | bc70e4fe85e3db16a64de7376030f9a4470335b8 /options.i | |
parent | 021dc3c718aeed6ab6e95b8134e02404aac22ec1 (diff) | |
download | xcftools-27f6ea800cfd66b1024b0379aa1ac9631e799ee7.zip xcftools-27f6ea800cfd66b1024b0379aa1ac9631e799ee7.tar.gz xcftools-27f6ea800cfd66b1024b0379aa1ac9631e799ee7.tar.bz2 |
Import of release 1.0.2
Diffstat (limited to 'options.i')
-rw-r--r-- | options.i | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -57,7 +57,7 @@ OPTION('z',--gzip,input is gzip compressed, unzipper = "zcat" ; break ; -OPTION('Z',--unpack,(cmd) use 'cmd' to decompress input, +OPTION('Z',--unpack,(command) use 'command' to decompress input, (Specify a command that the input file is filtered through before being interpreted as an XCF file. The command is invoked as .I command filename @@ -276,6 +276,8 @@ OPTION('S',--size,(w"x"h) crop image while converting, int n = 0 ; sscanf(optarg,"%ux%u%n",&w,&h,&n) ; if( n && n == strlen(optarg) ) { + if( flatspec.window_mode == AUTOCROP ) flatspec.window_mode = USE_CANVAS ; + flatspec.window_mode |= MANUAL_CROP ; flatspec.dim.width = w ; flatspec.dim.height = h ; } else @@ -293,6 +295,8 @@ OPTION('O',--offset,(x","y) translate converted part of image, int n = 0 ; sscanf(optarg,"%d,%d%n",&x,&y,&n) ; if( n && n == strlen(optarg) ) { + if( flatspec.window_mode == AUTOCROP ) flatspec.window_mode = USE_CANVAS ; + flatspec.window_mode |= MANUAL_OFFSET ; flatspec.dim.c.l = x ; flatspec.dim.c.t = y ; } else @@ -300,6 +304,19 @@ OPTION('O',--offset,(x","y) translate converted part of image, break ; } +OPTION('C',--autocrop,autocrop to visible layer boundaries, + (Crop and offset the converted part of the image to just include + the boundaries of the visible (or selected) layers. + (Note that the + .I contents + of the layers is not taken into account when autocropping). + .IP + In the absence of options that specify otherwise, the converted + image will cover the entire XCF canvas. + )); +flatspec.window_mode = AUTOCROP ; +break ; + #ifndef XCFVIEW OPTIONGROUP(1il,Layer-selection options); #endif |