Skip to content
Closed
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Fixed inconsistency with displaying EXIF metadata with different aspect ratios

## [1.5.0] - 2026-01-30
### Added
Expand Down Expand Up @@ -76,6 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#157]: https://github.com/FossifyOrg/Camera/issues/157
[#177]: https://github.com/FossifyOrg/Camera/issues/177
[#234]: https://github.com/FossifyOrg/Camera/issues/234
[#198]: https://github.com/FossifyOrg/Camera/issues/198

[Unreleased]: https://github.com/FossifyOrg/Camera/compare/1.5.0...HEAD
[1.5.0]: https://github.com/FossifyOrg/Camera/compare/1.4.0...1.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.fossify.camera.helpers.ImageUtil.imageToJpegByteArray
import org.fossify.camera.helpers.ImageUtil.jpegImageToJpegByteArray
import org.fossify.camera.models.MediaOutput
import org.fossify.commons.extensions.copyTo
import org.fossify.commons.extensions.removeValues
import org.fossify.commons.helpers.ensureBackgroundThread
import org.fossify.commons.helpers.isQPlus
import java.io.*
Expand Down Expand Up @@ -101,9 +102,9 @@ class ImageSaver private constructor(
val output = FileOutputStream(tempFile)
val byteArray: ByteArray = imageToJpegByteArray(image, jpegQuality)
output.write(byteArray)
val exifInterface = ExifInterface(tempFile)

if (saveExifAttributes) {
val exifInterface = ExifInterface(tempFile)
val imageByteArray = jpegImageToJpegByteArray(image)
val inputStream: InputStream = ByteArrayInputStream(imageByteArray)
ExifInterface(inputStream).copyTo(exifInterface)
Expand All @@ -126,6 +127,8 @@ class ImageSaver private constructor(
}

exifInterface.saveAttributes()
}else {
exifInterface.removeValues()
}
} catch (e: IOException) {
saveError = SaveError.FILE_IO_FAILED
Expand Down
Loading