Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
main.c File Reference
#include "darktable.h"
#include "common/paths.h"
#include "common/xmp_sidecar.h"
#include "common/film.h"
#include "common/file_location.h"
#include "history/history.h"
#include "common/image.h"
#include "caches/image_cache.h"
#include "imageio/imageio_module.h"
#include "common/l10n.h"
#include <inttypes.h>
#include <libintl.h>
#include "osx/osx.h"
#include "win/main_wrapper.h"
Include dependency graph for ansel-cli/main.c:

Go to the source code of this file.

Macros

#define DT_MAX_STYLE_NAME_LENGTH   128
#define DT_MAX_OUTPUT_EXT_LENGTH   5
#define ICC_FROM_STR(name)
#define ICC_INTENT_FROM_STR(name)

Functions

static void usage (const char *progname)
static void icc_types ()
static dt_colorspaces_color_profile_type_t get_icc_type (const char *option)
static void icc_intents ()
static dt_iop_color_intent_t get_icc_intent (const char *option)
int main (int argc, char *arg[])

Macro Definition Documentation

◆ DT_MAX_OUTPUT_EXT_LENGTH

#define DT_MAX_OUTPUT_EXT_LENGTH   5

Definition at line 78 of file ansel-cli/main.c.

Referenced by main().

◆ DT_MAX_STYLE_NAME_LENGTH

#define DT_MAX_STYLE_NAME_LENGTH   128

TODO:

  • make –bpp work
  • add options for interpolator
  • make these settings work
  • ???
  • profit

Definition at line 75 of file ansel-cli/main.c.

Referenced by main().

◆ ICC_FROM_STR

#define ICC_FROM_STR ( name)
Value:
if(!strcmp(option, #name)) return DT_COLORSPACE_ ## name;
const char * name
Definition pdf.h:90

Definition at line 146 of file ansel-cli/main.c.

Referenced by get_icc_type().

◆ ICC_INTENT_FROM_STR

#define ICC_INTENT_FROM_STR ( name)
Value:
if(!strcmp(option, #name)) return DT_INTENT_ ## name;

Definition at line 189 of file ansel-cli/main.c.

Referenced by get_icc_intent().

Function Documentation

◆ get_icc_intent()

dt_iop_color_intent_t get_icc_intent ( const char * option)
static

Definition at line 190 of file ansel-cli/main.c.

References DT_INTENT_LAST, and ICC_INTENT_FROM_STR.

Referenced by main().

◆ get_icc_type()

dt_colorspaces_color_profile_type_t get_icc_type ( const char * option)
static

Definition at line 147 of file ansel-cli/main.c.

References DT_COLORSPACE_LAST, ICC_FROM_STR, NONE, and XYZ.

Referenced by main().

◆ icc_intents()

void icc_intents ( )
static
Todo
: Can this be automated to keep in sync with colorspaces.h?

Definition at line 180 of file ansel-cli/main.c.

Referenced by main().

◆ icc_types()

void icc_types ( )
static
Todo
: Can this be automated to keep in sync with colorspaces.h?

Definition at line 113 of file ansel-cli/main.c.

Referenced by main().

◆ main()

int main ( int argc,
char * arg[] )
Todo
: test if file with replaced ext exists
Todo
: add a callback to set the bpp without going through the config
Todo
: have a parameter in command line to get the export presets

Definition at line 200 of file ansel-cli/main.c.

References bpp, darktable_last_commit_year, darktable_package_version, dt_imageio_module_format_t::dimension, dt_imageio_module_storage_t::dimension, directory, dt_cleanup(), DT_COLORSPACE_LAST, DT_COLORSPACE_NONE, dt_exif_xmp_read(), dt_film_get_image_ids(), dt_film_import(), dt_film_new(), dt_free, dt_free_gpointer(), dt_history_get_items_as_string(), dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), dt_image_import(), dt_imageio_get_format_by_name(), dt_imageio_get_storage_by_name(), dt_init(), DT_INTENT_LAST, dt_l10n_disable_setlocale_early(), dt_lib_export_metadata_default_flags(), dt_loc_resolve_localedir(), DT_MAX_OUTPUT_EXT_LENGTH, DT_MAX_PATH_FOR_PARAMS, DT_MAX_STYLE_NAME_LENGTH, dt_osx_prepare_environment(), DT_PATH_MAX, FALSE, dt_imageio_module_storage_t::finalize_store, dt_export_metadata_t::flags, dt_imageio_module_format_t::free_params, dt_imageio_module_storage_t::free_params, get_icc_intent(), get_icc_type(), dt_imageio_module_format_t::get_params, dt_imageio_module_storage_t::get_params, GETTEXT_PACKAGE, height, icc_intents(), icc_types(), dt_image_t::id, dt_imageio_module_storage_t::initialize_store, IS_NULL_PTR, k, dt_export_metadata_t::list, MAX, dt_imageio_module_data_t::max_height, dt_imageio_module_data_t::max_width, dt_imageio_module_format_t::params_size, dt_imageio_module_storage_t::params_size, res, dt_imageio_module_format_t::set_params, dt_imageio_module_storage_t::set_params, dt_imageio_module_storage_t::store, dt_imageio_module_data_t::style, TRUE, usage(), and width.

◆ usage()

void usage ( const char * progname)
static

Definition at line 80 of file ansel-cli/main.c.

Referenced by getrusage(), and main().