diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish
index 632bad978..dfb3b6397 100644
--- a/rtdata/languages/Polish
+++ b/rtdata/languages/Polish
@@ -833,6 +833,7 @@ TP_COLORSHIFT_LABEL;Przesunięcie koloru
TP_CROP_DPI;DPI=
TP_CROP_FIXRATIO;Zablokuj proporcje:
TP_CROP_GTDIAGONALS;Przekątna
+TP_CROP_GTEPASSPORT;Paszport biometryczny
TP_CROP_GTGRID;Siatka
TP_CROP_GTHARMMEANS1;Złoty podział 1
TP_CROP_GTHARMMEANS2;Złoty podział 2
@@ -1130,7 +1131,6 @@ ZOOMPANEL_ZOOM100;Powiększ do 100% 1
ZOOMPANEL_ZOOMFITSCREEN;Dopasuj do ekranu F
ZOOMPANEL_ZOOMIN;Przybliż +
ZOOMPANEL_ZOOMOUT;Oddal -
-
#00 Polish
#01 24.12.2007
#02 Mateusz Ludwin
@@ -1146,6 +1146,9 @@ ZOOMPANEL_ZOOMOUT;Oddal -
#12 2012-01-14 DrSlony
#13 2012-01-30 DrSlony
+
!!!!!!!!!!!!!!!!!!!!!!!!!
! Untranslated keys follow; remove the ! prefix after an entry is translated.
!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters)
index 05e853558..c6b667571 100644
--- a/rtdata/languages/Polish (Latin Characters)
+++ b/rtdata/languages/Polish (Latin Characters)
@@ -833,6 +833,7 @@ TP_COLORSHIFT_LABEL;Przesuniecie koloru
TP_CROP_DPI;DPI=
TP_CROP_FIXRATIO;Zablokuj proporcje:
TP_CROP_GTDIAGONALS;Przekatna
+TP_CROP_GTEPASSPORT;Paszport biometryczny
TP_CROP_GTGRID;Siatka
TP_CROP_GTHARMMEANS1;Zloty podzial 1
TP_CROP_GTHARMMEANS2;Zloty podzial 2
@@ -1130,7 +1131,6 @@ ZOOMPANEL_ZOOM100;Powieksz do 100% 1
ZOOMPANEL_ZOOMFITSCREEN;Dopasuj do ekranu F
ZOOMPANEL_ZOOMIN;Przybliz +
ZOOMPANEL_ZOOMOUT;Oddal -
-
#00 Polish
#01 24.12.2007
#02 Mateusz Ludwin
@@ -1146,6 +1146,9 @@ ZOOMPANEL_ZOOMOUT;Oddal -
#12 2012-01-14 DrSlony
#13 2012-01-30 DrSlony
+
!!!!!!!!!!!!!!!!!!!!!!!!!
! Untranslated keys follow; remove the ! prefix after an entry is translated.
!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
diff --git a/rtdata/languages/default b/rtdata/languages/default
index de12a042b..c811628f3 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -822,6 +822,7 @@ TP_COLORSHIFT_GREENMAGENTA;Green-Magenta
TP_COLORSHIFT_LABEL;Color Shift
TP_CROP_FIXRATIO;Fix Ratio:
TP_CROP_GTDIAGONALS;Rule of diagonals
+TP_CROP_GTEPASSPORT;Biometric Passport
TP_CROP_GTGRID;Grid
TP_CROP_GTHARMMEANS1;Harmonic means 1
TP_CROP_GTHARMMEANS2;Harmonic means 2
diff --git a/rtgui/crop.cc b/rtgui/crop.cc
index ee9f926a2..43e52a6ad 100644
--- a/rtgui/crop.cc
+++ b/rtgui/crop.cc
@@ -134,7 +134,7 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
/****************
* Crop Ratio
*****************/
- int NumberOfCropRatios = 25; //!!! change this value when adding new crop ratios
+ int NumberOfCropRatios = 26; //!!! change this value when adding new crop ratios
cropratio.resize (NumberOfCropRatios);
cropratio[0].label = "3:2"; cropratio[0].value = 3.0/2.0;
@@ -162,6 +162,7 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
cropratio[22].label = "11:17 - Tabloid"; cropratio[22].value = 11.0/17.0;
cropratio[23].label = "13:19"; cropratio[23].value = 13.0/19.0;
cropratio[24].label = "17:22"; cropratio[24].value = 17.0/22.0;
+ cropratio[25].label = "45:35 - ePassport"; cropratio[25].value = 45.0/35.0;
@@ -184,6 +185,7 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
guide->append_text (M("TP_CROP_GTHARMMEANS3"));
guide->append_text (M("TP_CROP_GTHARMMEANS4"));
guide->append_text (M("TP_CROP_GTGRID"));
+ guide->append_text (M("TP_CROP_GTEPASSPORT"));
guide->set_active (0);
w->set_range (0, maxw);
@@ -290,6 +292,8 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited) {
guide->set_active (6);
else if (pp->crop.guide == "Grid")
guide->set_active (7);
+ else if (pp->crop.guide == "ePassport")
+ guide->set_active (8);
x->set_value (pp->crop.x);
y->set_value (pp->crop.y);
@@ -370,12 +374,14 @@ void Crop::write (ProcParams* pp, ParamsEdited* pedited) {
pp->crop.guide = "Harmonic means 4";
else if (guide->get_active_row_number()==7)
pp->crop.guide = "Grid";
+ else if (guide->get_active_row_number()==8)
+ pp->crop.guide = "ePassport";
if (pedited) {
pedited->crop.enabled = !enabled->get_inconsistent();
pedited->crop.ratio = ratio->get_active_row_number() != 8;
pedited->crop.orientation = orientation->get_active_row_number() != 2;
- pedited->crop.guide = guide->get_active_row_number() != 7;
+ pedited->crop.guide = guide->get_active_row_number() != 8;
pedited->crop.fixratio = !fixr->get_inconsistent();
pedited->crop.w = wDirty;
pedited->crop.h = hDirty;
diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc
index 11d7e8ef1..6c34d0853 100644
--- a/rtgui/guiutils.cc
+++ b/rtgui/guiutils.cc
@@ -155,6 +155,17 @@ void drawCrop (Cairo::RefPtr cr, int imx, int imy, int imw, int
}
}
}
+ else if (cparams.guide=="ePassport") {
+ /* Official measurements do not specify exact ratios, just min/max measurements within which the eyes and chin-crown distance must lie. I averaged those measurements to produce these guides.
+ * The first horizontal guide is for the crown, the second is rougly for the nostrils, the third is for the chin.
+ * http://www.homeoffice.gov.uk/agencies-public-bodies/ips/passports/information-photographers/
+ * "(...) the measurement of the face from the bottom of the chin to the crown (ie the top of the head, not the top of the hair) is between 29mm and 34mm."
+ */
+ horiz_ratios.push_back (7.0/45.0);
+ horiz_ratios.push_back (26.0/45.0);
+ horiz_ratios.push_back (37.0/45.0);
+ vert_ratios.push_back (0.5);
+ }
// Horizontals
for (int i=0; i