From 8a76b2b431ede5afe5fdf19b4ce85fafac38bcc2 Mon Sep 17 00:00:00 2001 From: Anton Dukhovnikov Date: Thu, 8 Aug 2024 14:35:41 +1200 Subject: [PATCH] adds help Signed-off-by: Anton Dukhovnikov --- include/rawtoaces/acesrender.h | 2 +- src/rawtoaces_util2/rawtoaces_util.cpp | 61 +++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/include/rawtoaces/acesrender.h b/include/rawtoaces/acesrender.h index 0a28a77..2d8d98c 100644 --- a/include/rawtoaces/acesrender.h +++ b/include/rawtoaces/acesrender.h @@ -115,7 +115,7 @@ class AcesRender const libraw_processed_image_t *getImageBuffer() const; const struct Option getSettings() const; -protected: +private: AcesRender(); ~AcesRender(); static AcesRender &getPrivateInstance(); diff --git a/src/rawtoaces_util2/rawtoaces_util.cpp b/src/rawtoaces_util2/rawtoaces_util.cpp index 17ab834..0b4ef67 100644 --- a/src/rawtoaces_util2/rawtoaces_util.cpp +++ b/src/rawtoaces_util2/rawtoaces_util.cpp @@ -57,13 +57,64 @@ ImageConverter::ImageConverter() initArgParse(); } +const char *HelpString = + "Rawtoaces converts raw image files from a digital camera to " + "the Academy Colour Encoding System (ACES) compliant images.\n" + "The process consists of two parts:\n" + "- the colour values get converted from the camera native colour " + "space to the ACES AP0 (see \"SMPTE ST 2065-1\"), and \n" + "- the image file gets converted from the camera native raw " + "file format to the ACES Image Container file format " + "(see \"SMPTE ST 2065-4\").\n" + "\n" + "Rawtoaces supports the following white-balancing modes:\n" + "- \"metadata\" uses the white-balancing coefficients from the raw " + "image file, provided by the camera.\n" + "- \"illuminant\" performs white balancing to the illuminant, " + "provided in the \"--illuminant\" parameter. The list of the " + "supported illuminants can be seen using the " + "\"--list-illuminants\" parameter. This mode requires spectral " + "sensitivity data for the camera model the image comes from. " + "The list of cameras such data is available for, can be " + "seen using the \"--list-cameras\" parameter.\n" + "- \"box\" performs white-balancing to make the given region of " + "the image appear neutral gray. The box position (origin and size) " + "can be specified using the \"--wb-box\" parameter. In case no such " + "parameter provided, the whole image is used for white-balancing.\n" + "- \"custom\" uses the custom white balancing coefficients " + "provided using the -\"custom-wb\" parameter.\n" + "\n" + "Rawtoaces supports the following methods of color matrix " + "computation:\n" + "- \"spectral\" uses the camera sensor's spectral sensitivity data " + "to compute the optimal matrix. This mode requires spectral " + "sensitivity data for the camera model the image comes from. " + "The list of cameras such data is available for, can be " + "seen using the \"--list-cameras\" parameter.\n" + "- \"metadata\" uses the matrix (matrices) contained in the raw " + "image file metadata. This mode works best with the images using " + "the DNG format, as the DNG standard mandates the presense of " + "such matrices.\n" + "- \"Adobe\" uses the Adobe coefficients provided by LibRaw. \n" + "- \"custom\" uses a user-provided color conversion matrix. " + "A matrix can be specified using the \"--custom-mat\" parameter.\n" + "\n" + "The paths rawtoaces uses to search for the spectral sensitivity " + "data can be specified in the AMPAS_DATA_PATH environment " + "variable.\n"; + +const char *UsageString = + "\n" + " rawtoaces --wb-method METHOD --mat-method METHOD [PARAMS] " + "path/to/dir/or/file ...\n" + "Examples: \n" + " rawtoaces --wb-method metadata --mat-method metadata raw_file.cr3\n" + " rawtoaces --wb-method illuminant --illuminant 3200K --mat-method " + "spectral raw_file.cr3\n"; + void ImageConverter::initArgParse() { - _argParse - .intro( - "rawtoaces converts an raw image file from a digital camera to ACES." ) - .usage( "usage\nusage" ); - + _argParse.intro( HelpString ).usage( UsageString ); _argParse.print_defaults( true ); _argParse.add_help( true ); _argParse.add_version( "VERSION NUMBER" );