diff --git a/Clop.xcodeproj/project.pbxproj b/Clop.xcodeproj/project.pbxproj index 2e2d68e..86f39c0 100644 --- a/Clop.xcodeproj/project.pbxproj +++ b/Clop.xcodeproj/project.pbxproj @@ -401,7 +401,7 @@ CODE_SIGN_ENTITLEMENTS = Clop/Clop.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2.1.2; + CURRENT_PROJECT_VERSION = 2.1.3; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Clop/Preview Content\""; DEVELOPMENT_TEAM = RDDXV84A73; @@ -421,7 +421,7 @@ "$(PROJECT_DIR)/Clop/bin", ); LLVM_LTO = YES_THIN; - MARKETING_VERSION = 2.1.2; + MARKETING_VERSION = 2.1.3; PRODUCT_BUNDLE_IDENTIFIER = com.lowtechguys.Clop; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -437,7 +437,7 @@ CODE_SIGN_ENTITLEMENTS = Clop/Clop.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2.1.2; + CURRENT_PROJECT_VERSION = 2.1.3; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Clop/Preview Content\""; DEVELOPMENT_TEAM = RDDXV84A73; @@ -457,7 +457,7 @@ "$(PROJECT_DIR)/Clop/bin", ); LLVM_LTO = YES; - MARKETING_VERSION = 2.1.2; + MARKETING_VERSION = 2.1.3; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.lowtechguys.Clop; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Clop/Images.swift b/Clop/Images.swift index 37ea438..2bbd487 100644 --- a/Clop/Images.swift +++ b/Clop/Images.swift @@ -261,20 +261,17 @@ class Image: CustomStringConvertible { } let optimised = item.string(forType: .optimisationStatus) == "true" - let (data, type): (Data?, UTType?) = [NSPasteboard.PasteboardType.png, .jpeg, .gif, .tiff].lazy.compactMap { t in - guard let d = item.data(forType: t) else { - return nil - } - return (d, UTType(t.rawValue)) - }.first ?? (nil, nil) + let data: Data? = [NSPasteboard.PasteboardType.png, .jpeg, .gif, .tiff].lazy.compactMap { t in + item.data(forType: t) + }.first if let originalPath = item.existingFilePath, let path = try? originalPath.copy(to: .images, force: true), - let img = Image(path: path, data: data, nsImage: nsImage, type: type, optimised: optimised, retinaDownscaled: false) + let img = Image(path: path, data: data, nsImage: nsImage, optimised: optimised, retinaDownscaled: false) { return img } - guard let img = Image(nsImage: nsImage, data: data, type: type, optimised: optimised, retinaDownscaled: false) else { + guard let img = Image(nsImage: nsImage, data: data, optimised: optimised, retinaDownscaled: false) else { throw ClopError.noClipboardImage(item.filePath ?? .init()) } diff --git a/Makefile b/Makefile index be4ea6d..3913b23 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ ifeq (, $(VERSION)) VERSION=$(shell rg -o --no-filename 'MARKETING_VERSION = ([^;]+).+' -r '$$1' *.xcodeproj/project.pbxproj | head -1) endif -ifeq (beta, $(BETA)) +ifneq (, $(BETA)) FULL_VERSION:=$(VERSION)b$(BETA) else FULL_VERSION:=$(VERSION) diff --git a/ReleaseNotes/2.1.3.md b/ReleaseNotes/2.1.3.md new file mode 100644 index 0000000..dcb2300 --- /dev/null +++ b/ReleaseNotes/2.1.3.md @@ -0,0 +1,3 @@ +## Fixes + +- Fix optimisation on copied JPEGs as `public.png` diff --git a/Releases/appcast.xml b/Releases/appcast.xml index 114f36f..242d24e 100644 --- a/Releases/appcast.xml +++ b/Releases/appcast.xml @@ -1,6 +1,24 @@ + + 2.1.3 + Wed, 23 Aug 2023 23:05:23 +0300 + https://lowtechguys.com/clop + https://github.com/FuzzyIdeas/Clop/releases + 2.1.3 + 2.1.3 + 13.0 + https://files.lowtechguys.com/ReleaseNotes/Clop-2.1.3.html + + + + + + + + + 2.1.2 Tue, 22 Aug 2023 17:52:54 +0300