mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-25 02:04:15 +02:00
Fix problem with unconstrained number of decimal digits for exposure value in info-panel
The photo exposure value will often overrun the focal length value in the info-panel when the number of decimal digits is more than a few long. By convention, there shouldn't be any decimal digits in the denominator so this fix rounds the denominator value before display. In addition, this fix increases the number of decimal digits read from the photo exif metadata to improve the precision of the exposure value to match what exiftool and other exif viewers display.
This commit is contained in:
parent
8af0f96660
commit
a81a96f30a
@ -152,7 +152,7 @@ export class MetadataLoader {
|
||||
if (Utils.isFloat32(exif.tags.ExposureTime)) {
|
||||
metadata.cameraData = metadata.cameraData || {};
|
||||
metadata.cameraData.exposure = parseFloat(
|
||||
parseFloat('' + exif.tags.ExposureTime).toFixed(4)
|
||||
parseFloat('' + exif.tags.ExposureTime).toFixed(6)
|
||||
);
|
||||
}
|
||||
if (Utils.isFloat32(exif.tags.FNumber)) {
|
||||
|
@ -158,7 +158,7 @@ export class InfoPanelLightboxComponent implements OnInit, OnChanges {
|
||||
if (f > 1) {
|
||||
return f;
|
||||
}
|
||||
return '1/' + 1 / f;
|
||||
return '1/' + Math.round(1 / f);
|
||||
}
|
||||
|
||||
hasPositionData(): boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user