Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions data-examples/dcpro-layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Layout specification for LaserSoft DC Pro layout
// Can be used for flat-field correction and glare modeling
{
"RowCount": 10,
"ColCount": 14,
"RelativeRowHeight": 1.0,
"RelativeColWidth": 1.0,
"HasColOffset": false,

"WhitePatches": [ "A08", "B01", "B14", "E08", "I01", "I14", "J03" ],
"BlackPatches": [ "A02", "A07", "A13", "C01", "C14", "E07", "F08", "H01", "H14", "J02", "J13" ],
"MiddleGrayPatches": [ "A04", "A11", "E01", "E14", "J09" ]
}
12 changes: 12 additions & 0 deletions data-examples/dt3-layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Layout specification for CMP Color Digital Target 3
{
"RowCount": 19,
"ColCount": 30,
"RelativeRowHeight": 1.0,
"RelativeColWidth": 1.0,
"HasColOffset": false,

"WhitePatches": [ "R13" ],
"BlackPatches": [ "M08" ],
"MiddleGrayPatches": [ "O12" ]
}
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dcamprof (1.0.7) undefined; urgency=low

* New release.

-- John Doe <johndoe@example.net> Thu, 18 May 2023 17:46:29 +0200

11 changes: 11 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Source: dcamprof
Priority: optional
Section: graphics
Maintainer: John Doe <johndoe@example.net>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.6.0

Package: dcamprof
Section: graphics
Architecture: any
Description: Digital Camera Profiler
1 change: 1 addition & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
www
1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data-examples/* usr/share/dcamprof
7 changes: 7 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/make -f

%:
dh $@ --sourcedirectory=src

override_dh_auto_install:
dh_auto_install -- PREFIX=/usr
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INSTALL_PREFIX = /usr/local
PREFIX = /usr/local
DCAMPROF_VERSION = $(shell cat VERSION)
CC = gcc
CFLAGS = -Wall -std=c99 -g -O2 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -fopenmp
Expand Down Expand Up @@ -50,8 +50,8 @@ dcamprof: $(DCAMPROF_OBJS)
$(CC) -o $@ $(LDFLAGS) $(DCAMPROF_OBJS) -llcms2 -ltiff -lm

install: $(PROGS)
install -d $(INSTALL_PREFIX)/bin
install $(PROGS) $(INSTALL_PREFIX)/bin
install -d $(DESTDIR)$(PREFIX)/bin
install $(PROGS) $(DESTDIR)$(PREFIX)/bin

clean:
rm -f $(DCAMPROF_OBJS) ${PROGS}
2 changes: 1 addition & 1 deletion src/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.6
1.0.7
19 changes: 19 additions & 0 deletions src/dcamprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,7 @@ make_dcp(struct dcam_profile *prof,
dcp->camera_model = strdup(prof->camera_name);
} else {
dcp->camera_model = strdup("Unknown Camera");
elog("Warning: unique camera name should be set to exif make/model\n");
}
dcp->profile_name = strdup("Generated by DCamProf v" DCAMPROF_VERSION);
dcp->copyright = strdup("Copyright, the creator of this profile (generated by DCamProf v" DCAMPROF_VERSION ")");
Expand Down Expand Up @@ -3544,6 +3545,7 @@ print_usage_and_exit(void)
" -n <unique camera name>\n"
" -d <profile name>\n"
" -c <copyright>\n"
" -s <calibration signature>\n"
" -b <baseline exposure offset>\n"
" -B don't include default black render = none tag\n"
" -i <calibration illuminant1> (default: from source profile)\n"
Expand Down Expand Up @@ -5020,6 +5022,7 @@ main(int argc,
const char *camera_name = NULL;
const char *description = NULL;
const char *copyright = NULL;
const char *calibration_signature = NULL;
double baseline_exposure_offset = 0;
bool skip_black_render_none = false;
bool enable_3d_hsm = false;
Expand Down Expand Up @@ -5047,6 +5050,7 @@ main(int argc,
case 'n': camera_name = argv[++ai]; break;
case 'd': description = argv[++ai]; break;
case 'c': copyright = argv[++ai]; break;
case 's': calibration_signature = argv[++ai]; break;
case 'b': baseline_exposure_offset = atof(argv[++ai]); has_beo = true; break;
case 'B': skip_black_render_none = true; break;
case 'i':
Expand Down Expand Up @@ -5142,11 +5146,26 @@ main(int argc,
if (description != NULL) {
free(dcp->profile_name);
dcp->profile_name = strdup(description);
} else {
if (tc_type == TC_STANDARD) {
dcp->profile_name = strdup("Standard");
}
if (tc_type == TC_STANDARD) {
if (ntro_conf == NULL) {
dcp->profile_name = strdup("Neutral");
} else {
dcp->profile_name = strdup("Custom");
}
}
}
if (copyright != NULL) {
free(dcp->copyright);
dcp->copyright = strdup(copyright);
}
if (calibration_signature != NULL) {
free(dcp->calibration_signature);
dcp->calibration_signature = strdup(calibration_signature);
}
if (has_beo) {
dcp->baseline_exposure_offset = baseline_exposure_offset;
dcp->has.baseline_exposure_offset = true;
Expand Down
2 changes: 1 addition & 1 deletion src/dnglut.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ dnglut_looktable_new(uint32_t hsmdims[3],
enum gc_type gc_type,
const struct tone_rep_op_config *ntro_conf)
{
elog("Generating 3D LookTable with %dx%dx%d = %d entries for the neutral tone reproduction operator...\n 0%%", hcount, scount, vcount, hcount*scount*vcount);
elog("Generating 3D LookTable with %dx%dx%d = %d entries for the tone reproduction operator...\n 0%%", hcount, scount, vcount, hcount*scount*vcount);
const m3x3 xyz2rgb = dcp_xyz_D50_to_prophoto_rgb;
const m3x3 rgb2xyz = m3x3_invert(xyz2rgb);
v3 *hsm = malloc(hcount * scount * vcount * sizeof(*hsm));
Expand Down
2 changes: 1 addition & 1 deletion src/tifio.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ tifio_rgbimg_save(const char filename[],
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3);
TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
if (colorspace == COLORSPACE_PROPHOTO) {
static const uint8 prophoto_icc[] =
static const uint8_t prophoto_icc[] =
{
0x00, 0x00, 0x03, 0xAC, 0x4B, 0x43, 0x4D, 0x53, 0x02, 0x10, 0x00, 0x00,
0x6D, 0x6E, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5A, 0x20,
Expand Down