Skip to content

Commit

Permalink
adds help
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Dukhovnikov <[email protected]>
  • Loading branch information
antond-weta committed Aug 8, 2024
1 parent 710230c commit 8a76b2b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/rawtoaces/acesrender.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
61 changes: 56 additions & 5 deletions src/rawtoaces_util2/rawtoaces_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down

0 comments on commit 8a76b2b

Please sign in to comment.