From a183b0ae95f6ab5ee86f1e4d96ebc67fb6166bdf Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Wed, 17 Jul 2024 12:32:36 +0300 Subject: [PATCH] Fix minor linter issues --- Sources/bitmapImportExport/Bitmap+JPEG.swift | 2 +- Sources/bitmapImportExport/JPEG.Data.Rectangular.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/bitmapImportExport/Bitmap+JPEG.swift b/Sources/bitmapImportExport/Bitmap+JPEG.swift index 2e7be46..67ab36a 100644 --- a/Sources/bitmapImportExport/Bitmap+JPEG.swift +++ b/Sources/bitmapImportExport/Bitmap+JPEG.swift @@ -10,7 +10,7 @@ public extension Bitmap { /// Alpha of background itself is ignored. func jpegData(blending background: Rgba = .white) throws -> Data { let rgb: [JPEG.RGB] = backing - //.lazy // TODO: make lazy work! + // .lazy // TODO: make lazy work! .chunks(ofCount: 4) .map { Rgba($0).blending(background: background) } .map { JPEG.RGB($0.r, $0.g, $0.b) } diff --git a/Sources/bitmapImportExport/JPEG.Data.Rectangular.swift b/Sources/bitmapImportExport/JPEG.Data.Rectangular.swift index f607ccb..54dc81e 100644 --- a/Sources/bitmapImportExport/JPEG.Data.Rectangular.swift +++ b/Sources/bitmapImportExport/JPEG.Data.Rectangular.swift @@ -7,7 +7,7 @@ extension JPEG.Data.Rectangular { switch m { case .exif(let exif): if let orientationTag = exif[tag: 0x112] { - let orientation = orientationTag.box.endianness == .littleEndian + let orientation = orientationTag.box.endianness == .littleEndian ? orientationTag.box.contents.0 : orientationTag.box.contents.1 return Int(orientation) }