List Info

Thread: wish: *add* (not edit) EXIF headers like date, comment etc




wish: *add* (not edit) EXIF headers like date, comment etc
user name
2006-10-24 10:48:36
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.
         
http://bug
s.kde.org/show_bug.cgi?id=103255         




------- Additional Comments From caulier.gilles free fr 
2006-10-24 12:48 -------
SVN commit 598655 by cgilles:

kipiplugins from trunk : MetadataEdit plugin: Exif Exposure
informations editor: add Exposure Bias Value settings

CCBUGS: 103255

 M  +38 -6     exifexposure.cpp  
 M  +5 -6      exiflens.cpp  
 M  +1 -2      exiflight.cpp  


---
trunk/extragear/libs/kipi-plugins/metadataedit/exifexposure.
cpp #598654:598655
 
-57,6 +57,7  
         exposureTimeCheck    = 0;
         exposureProgramCheck = 0;
         exposureModeCheck    = 0;
+        exposureBiasCheck    = 0;
         ISOSpeedCheck        = 0;
         meteringModeCheck    = 0;
         exposureProgramCB    = 0;
 
-65,11 +66,13  
         meteringModeCB       = 0;
         exposureTimeNumEdit  = 0;
         exposureTimeDenEdit  = 0;
+        exposureBiasEdit     = 0;
     }
 
     QCheckBox      *exposureTimeCheck;
     QCheckBox      *exposureProgramCheck;
     QCheckBox      *exposureModeCheck;
+    QCheckBox      *exposureBiasCheck;
     QCheckBox      *ISOSpeedCheck;
     QCheckBox      *meteringModeCheck;
    
 
-80,6 +83,8  
 
     KIntSpinBox    *exposureTimeNumEdit;
     KIntSpinBox    *exposureTimeDenEdit;
+
+    KDoubleSpinBox *exposureBiasEdit;
 };
 
 EXIFExposure::EXIFExposure(QWidget* parent, QByteArray&
exifData)
 
-87,7 +92,7  
 {
     d = new EXIFExposurePriv;
 
-    QGridLayout* grid = new QGridLayout(parent, 5, 5,
KDialog::spacingHint());
+    QGridLayout* grid = new QGridLayout(parent, 6, 5,
KDialog::spacingHint());
 
     //
--------------------------------------------------------
 
 
-138,6 +143,15  
 
     //
--------------------------------------------------------
 
+    d->exposureBiasCheck = new
QCheckBox(i18n("Exposure Bias (APEX):"), parent);
+    d->exposureBiasEdit  = new KDoubleSpinBox(-99.99,
99.99, 0.1, 0.0, 2, parent);
+    grid->addMultiCellWidget(d->exposureBiasCheck, 3,
3, 0, 0);
+    grid->addMultiCellWidget(d->exposureBiasEdit, 3,
3, 2, 2);
+    QWhatsThis::add(d->exposureBiasEdit,
i18n("<p>Set here the exposure bias value in APEX
unit "
+                                             "used by
camera to take the picture."));
+
+    //
--------------------------------------------------------
+
     d->meteringModeCheck = new
QCheckBox(i18n("Metering mode:"), parent);
     d->meteringModeCB    = new QComboBox(false, parent);
    
d->meteringModeCB->insertItem(i18n("Unknown"
),                 0);
 
-148,8 +162,8  
    
d->meteringModeCB->insertItem(i18n("Multi-segment
"),           5);
    
d->meteringModeCB->insertItem(i18n("Partial"
),                 6);
    
d->meteringModeCB->insertItem(i18n("Other"),
                  7);
-    grid->addMultiCellWidget(d->meteringModeCheck, 3,
3, 0, 0);
-    grid->addMultiCellWidget(d->meteringModeCB, 3, 3,
2, 5);
+    grid->addMultiCellWidget(d->meteringModeCheck, 4,
4, 0, 0);
+    grid->addMultiCellWidget(d->meteringModeCB, 4, 4,
2, 5);
     QWhatsThis::add(d->meteringModeCB,
i18n("<p>Select here the metering mode used by
the camera "
                                        "to set
exposure when the picture have been shot."));
 
 
-193,14 +207,14  
     d->ISOSpeedCB->insertItem("20000", 33);
     d->ISOSpeedCB->insertItem("25000", 34);
     d->ISOSpeedCB->insertItem("32000", 35);
-    grid->addMultiCellWidget(d->ISOSpeedCheck, 4, 4,
0, 0);
-    grid->addMultiCellWidget(d->ISOSpeedCB, 4, 4, 2,
5);
+    grid->addMultiCellWidget(d->ISOSpeedCheck, 5, 5,
0, 0);
+    grid->addMultiCellWidget(d->ISOSpeedCB, 5, 5, 2,
5);
     QWhatsThis::add(d->ISOSpeedCB,
i18n("<p>Select here the ISO Speed of the camera
"
                     "witch have taken the
picture."));
 
     grid->setColStretch(1, 10);                     
     grid->setColStretch(5, 10);                     
-    grid->setRowStretch(5, 10);                     
+    grid->setRowStretch(6, 10);                     
 
     //
--------------------------------------------------------
 
 
-216,6 +230,9  
     connect(d->exposureModeCheck, SIGNAL(toggled(bool)),
             d->exposureModeCB, SLOT(setEnabled(bool)));
 
+    connect(d->exposureBiasCheck, SIGNAL(toggled(bool)),
+            d->exposureBiasEdit,
SLOT(setEnabled(bool)));
+
     connect(d->meteringModeCheck, SIGNAL(toggled(bool)),
             d->meteringModeCB, SLOT(setEnabled(bool)));
 
 
-274,6 +291,13  
     }
    
d->exposureModeCB->setEnabled(d->exposureModeCheck-
>isChecked());
 
+    if
(exiv2Iface.getExifTagRational("Exif.Photo.ExposureBias
Value", num, den))
+    {
+        d->exposureBiasEdit->setValue((double)(num) /
(double)(den));
+        d->exposureBiasCheck->setChecked(true);
+    }
+   
d->exposureBiasEdit->setEnabled(d->exposureBiasChec
k->isChecked());
+
     if
(exiv2Iface.getExifTagLong("Exif.Photo.MeteringMode&quo
t;, val))
     {
         d->meteringModeCB->setCurrentItem(val > 6
? 7 : val);
 
-330,6 +354,14  
     else
        
exiv2Iface.removeExifTag("Exif.Photo.ExposureMode"
);
 
+    if (d->exposureBiasCheck->isChecked())
+    {
+       
exiv2Iface.convertToRational(d->exposureBiasEdit->valu
e(), &num, &den, 1);
+       
exiv2Iface.setExifTagRational("Exif.Photo.ExposureBiasV
alue", num, den);
+    }
+    else
+       
exiv2Iface.removeExifTag("Exif.Photo.ExposureBiasValue&
quot;);
+
     if (d->meteringModeCheck->isChecked())
     {
         long met = d->meteringModeCB->currentItem();
---
trunk/extragear/libs/kipi-plugins/metadataedit/exiflens.cpp
#598654:598655
 
-154,7 +154,7  
     d->focalLengthCheck = new QCheckBox(i18n("Focal
length (mm):"), parent);
     d->focalLengthEdit  = new KDoubleSpinBox(1.0,
10000.0, 1.0, 50.0, 1, parent);
     grid->addMultiCellWidget(d->focalLengthCheck, 0,
0, 0, 0);
-    grid->addMultiCellWidget(d->focalLengthEdit, 0,
0, 1, 1);
+    grid->addMultiCellWidget(d->focalLengthEdit, 0,
0, 2, 2);
     QWhatsThis::add(d->focalLengthEdit,
i18n("<p>Set here the lens focal lenght in
milimeters "
                                              "used by
camera to take the picture."));
 
 
-163,7 +163,7  
     d->focalLength35mmCheck = new
QCheckBox(i18n("Focal length in 35mm film (mm):"),
parent);
     d->focalLength35mmEdit  = new KIntSpinBox(1, 10000,
1, 1, 10, parent);
     grid->addMultiCellWidget(d->focalLength35mmCheck,
1, 1, 0, 0);
-    grid->addMultiCellWidget(d->focalLength35mmEdit,
1, 1, 1, 1);
+    grid->addMultiCellWidget(d->focalLength35mmEdit,
1, 1, 2, 2);
     QWhatsThis::add(d->focalLength35mmEdit,
i18n("<p>Set here equivalent focal length
assuming "
                                             "a 35mm
film camera, in mm. A value of 0 means the focal "
                                             "length is
unknown."));
 
-173,7 +173,7  
     d->digitalZoomRatioCheck = new
QCheckBox(i18n("Digital zoom ratio:"), parent);
     d->digitalZoomRatioEdit  = new KDoubleSpinBox(0.0,
100.0, 0.1, 1.0, 1, parent);
    
grid->addMultiCellWidget(d->digitalZoomRatioCheck, 2,
2, 0, 0);
-    grid->addMultiCellWidget(d->digitalZoomRatioEdit,
2, 2, 1, 1);
+    grid->addMultiCellWidget(d->digitalZoomRatioEdit,
2, 2, 2, 2);
     QWhatsThis::add(d->digitalZoomRatioEdit,
i18n("<p>Set here the digital zoom ratio "
                                              "used by
camera to take the picture."));
 
 
-183,7 +183,7  
     d->apertureCB    = new QComboBox(false, parent);
    
d->apertureCB->insertStringList(d->apertureValues);
     grid->addMultiCellWidget(d->apertureCheck, 3, 3,
0, 0);
-    grid->addMultiCellWidget(d->apertureCB, 3, 3, 1,
1);
+    grid->addMultiCellWidget(d->apertureCB, 3, 3, 2,
2);
     QWhatsThis::add(d->apertureCB,
i18n("<p>Select here the lens aperture used by
camera "
                                         "to take the
picture."));
 
 
-193,12 +193,11  
     d->maxApertureCB    = new QComboBox(false, parent);
    
d->maxApertureCB->insertStringList(d->apertureValue
s);
     grid->addMultiCellWidget(d->maxApertureCheck, 4,
4, 0, 0);
-    grid->addMultiCellWidget(d->maxApertureCB, 4, 4,
1, 1);
+    grid->addMultiCellWidget(d->maxApertureCB, 4, 4,
2, 2);
     QWhatsThis::add(d->maxApertureCB,
i18n("<p>Select here the smallest aperture of the
lens used by camera "
                                            "to take
the picture."));
 
     grid->setColStretch(1, 10);                     
-    grid->setColStretch(2, 10);                     
     grid->setRowStretch(5, 10);                     
 
     //
--------------------------------------------------------
---
trunk/extragear/libs/kipi-plugins/metadataedit/exiflight.cpp
#598654:598655
 
-152,7 +152,7  
     d->lightSourceCB->insertItem(i18n("ISO
studio tungsten"),                     19);
     d->lightSourceCB->insertItem(i18n("Other
light source"),                      20);
     grid->addMultiCellWidget(d->lightSourceCheck, 0,
0, 0, 0);
-    grid->addMultiCellWidget(d->lightSourceCB, 0, 0,
2, 5);
+    grid->addMultiCellWidget(d->lightSourceCB, 0, 0,
2, 3);
     QWhatsThis::add(d->lightSourceCB,
i18n("<p>Select here the kind of light source
used "
                                            "to take
the picture."));
 
 
-195,7 +195,6  
 
 
     grid->setColStretch(1, 10);                     
-    grid->setColStretch(3, 10);                     
     grid->setRowStretch(4, 10);                     
 
     //
--------------------------------------------------------
_______________________________________________
Digikam-devel mailing list
Digikam-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/digikam-devel
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )