Skip to content

Commit

Permalink
ADD: --combined option
Browse files Browse the repository at this point in the history
ADD: text to --auto and --combined in README.md
  • Loading branch information
spillerrec committed Oct 11, 2015
1 parent 466d6d9 commit 7b1ecb4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ Provides a file-size/compression-time trade-off. A value of 0 means maximum comp
--help
Display quick help and exit

--auto
Automatically tries to split the input files into several cgCompress files based on visual difference. Note that it will expand folders. It only compares files next to each other, so it requires the files to be in order. See `--combined` to manually fix those files which were split incorrectly.

--extract
Extract the images in cgCompress files to their original state. Use *\--format* to change output file format. Currently requires qt5-cgcompress-plugin to be installed.
Extract the images in cgCompress files to their original state. Use `--format` to change output file format. Currently requires qt5-cgcompress-plugin to be installed.

--recompress
Extract and recompress cgCompress files. Useful for optimizing files which were created in an older version of cgCompress. Currently requires qt5-cgcompress-plugin to be installed.

--combined
Extract and combines several cgCompress files into one file. Allows ordinary image files as well. Useful when `--auto` fails to combine files.

--pack
Create a cgCompress file from a directory containing an un-zipped cgCompress file. OpenRaster sets some requirements on the structure of the zip archive such as file order and compression settings, use this option to get it correct.

Expand Down
8 changes: 8 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ int main( int argc, char* argv[] ){
doMultiImg( multi_img, name );
}
}
else if( options.contains( "--combined" ) ){
MultiImage multi_img( format );
for( auto file : files )
for( auto image : extract_files( file ) )
multi_img.append( Image( image.second ) );

doMultiImg( multi_img, QFileInfo(files[0]).completeBaseName() );
}
else{
files = expandFolders( files );

Expand Down

0 comments on commit 7b1ecb4

Please sign in to comment.