Skip to content

Commit

Permalink
Included imageFormat into PhotoMetadata.kt (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanOltmann authored Apr 18, 2024
1 parent fcbfac4 commit 4a7e6a6
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 85 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ of Ashampoo Photo Organizer, which, in turn, is driven by user community feedbac
## Installation

```
implementation("com.ashampoo:kim:0.17.4")
implementation("com.ashampoo:kim:0.17.5")
```

For the targets `wasmJs` & `js` you also need to specify this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ object PhotoMetadataConverter {
* iso, exposure time, etc.) are always taken from EXIF.
*/
return PhotoMetadata(
imageFormat = imageMetadata.imageFormat,
widthPx = imageMetadata.imageSize?.width,
heightPx = imageMetadata.imageSize?.height,
orientation = orientation,
Expand Down
2 changes: 2 additions & 0 deletions src/commonMain/kotlin/com/ashampoo/kim/model/PhotoMetadata.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import kotlinx.datetime.toLocalDateTime
*/
data class PhotoMetadata(

val imageFormat: ImageFormat? = null,

/* Image resolution */
val widthPx: Int? = null,
val heightPx: Int? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class PhotoMetadataConverterTest {
val stringBuilder = StringBuilder()

stringBuilder.appendLine(
"name;widthPx;heightPx;orientation;takenDate;latitude;longitude;" +
"name;imageFormat;widthPx;heightPx;orientation;takenDate;latitude;longitude;" +
"cameraMake;cameraModel;lensMake;lensModel;iso;exposureTime;fNumber;" +
"focalLength;flagged;rating;keywords;personsInAlbums;albums;" +
"thumbnailImageSize;thumbnailBytes.size"
Expand All @@ -86,7 +86,7 @@ class PhotoMetadataConverterTest {
val metadata = entry.value

stringBuilder.appendLine(
"$name;${metadata.widthPx};${metadata.heightPx};" +
"$name;${metadata.imageFormat};${metadata.widthPx};${metadata.heightPx};" +
"${metadata.orientation};${metadata.takenDate};" +
"${metadata.gpsCoordinates?.latitude};${metadata.gpsCoordinates?.longitude};" +
"${metadata.cameraMake};${metadata.cameraModel};${metadata.lensMake};" +
Expand Down
Loading

0 comments on commit 4a7e6a6

Please sign in to comment.