Skip to content

Commit

Permalink
chore: release version 4.0.5
Browse files Browse the repository at this point in the history
SilenceLove committed Aug 12, 2023
1 parent 6419f33 commit b8f600d
Showing 28 changed files with 622 additions and 373 deletions.
2 changes: 1 addition & 1 deletion HXPhotoPicker-Lite.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "HXPhotoPicker-Lite"
spec.version = "4.0.4"
spec.version = "4.0.5"
spec.summary = "Photo selector - Support LivePhoto, GIF selection"
spec.homepage = "https://github.com/SilenceLove/HXPhotoPicker"
spec.license = { :type => "MIT", :file => "LICENSE" }
2 changes: 1 addition & 1 deletion HXPhotoPicker.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "HXPhotoPicker"
spec.version = "4.0.4"
spec.version = "4.0.5"
spec.summary = "照片/视频选择器 - 支持LivePhoto、GIF图片选择、自定义编辑照片/视频、3DTouch预览、浏览网络图片/网络视频 功能 - Imitation weibo photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, browse the web image function"
spec.homepage = "https://github.com/SilenceLove/HXPhotoPicker"
spec.license = { :type => "MIT", :file => "LICENSE" }
4 changes: 2 additions & 2 deletions HXPhotoPickerExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -2289,7 +2289,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.0.4;
MARKETING_VERSION = 4.0.5;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -2351,7 +2351,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.0.4;
MARKETING_VERSION = 4.0.5;
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
44 changes: 22 additions & 22 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
PODS:
- HXPhotoPicker (4.0.4):
- HXPhotoPicker/Full (= 4.0.4)
- HXPhotoPicker/Camera (4.0.4):
- HXPhotoPicker/Camera/Lite (= 4.0.4)
- HXPhotoPicker/Camera/Location (= 4.0.4)
- HXPhotoPicker/Camera/Lite (4.0.4):
- HXPhotoPicker (4.0.5):
- HXPhotoPicker/Full (= 4.0.5)
- HXPhotoPicker/Camera (4.0.5):
- HXPhotoPicker/Camera/Lite (= 4.0.5)
- HXPhotoPicker/Camera/Location (= 4.0.5)
- HXPhotoPicker/Camera/Lite (4.0.5):
- HXPhotoPicker/Core
- HXPhotoPicker/Camera/Location (4.0.4):
- HXPhotoPicker/Camera/Location (4.0.5):
- HXPhotoPicker/Camera/Lite
- HXPhotoPicker/Core (4.0.4)
- HXPhotoPicker/Editor (4.0.4):
- HXPhotoPicker/Editor/KF (= 4.0.4)
- HXPhotoPicker/Editor/Lite (= 4.0.4)
- HXPhotoPicker/Editor/KF (4.0.4):
- HXPhotoPicker/Core (4.0.5)
- HXPhotoPicker/Editor (4.0.5):
- HXPhotoPicker/Editor/KF (= 4.0.5)
- HXPhotoPicker/Editor/Lite (= 4.0.5)
- HXPhotoPicker/Editor/KF (4.0.5):
- HXPhotoPicker/Editor/Lite
- HXPhotoPicker/EditorView/KF
- Kingfisher (~> 7.0)
- HXPhotoPicker/Editor/Lite (4.0.4):
- HXPhotoPicker/Editor/Lite (4.0.5):
- HXPhotoPicker/EditorView/Lite
- HXPhotoPicker/EditorView/KF (4.0.4):
- HXPhotoPicker/EditorView/KF (4.0.5):
- HXPhotoPicker/EditorView/Lite
- Kingfisher (~> 7.0)
- HXPhotoPicker/EditorView/Lite (4.0.4):
- HXPhotoPicker/EditorView/Lite (4.0.5):
- HXPhotoPicker/Core
- HXPhotoPicker/Full (4.0.4):
- HXPhotoPicker/Full (4.0.5):
- HXPhotoPicker/Camera
- HXPhotoPicker/Editor
- HXPhotoPicker/Picker
- HXPhotoPicker/Picker (4.0.4):
- HXPhotoPicker/Picker/KF (= 4.0.4)
- HXPhotoPicker/Picker/Lite (= 4.0.4)
- HXPhotoPicker/Picker/KF (4.0.4):
- HXPhotoPicker/Picker (4.0.5):
- HXPhotoPicker/Picker/KF (= 4.0.5)
- HXPhotoPicker/Picker/Lite (= 4.0.5)
- HXPhotoPicker/Picker/KF (4.0.5):
- HXPhotoPicker/Picker/Lite
- Kingfisher (~> 7.0)
- HXPhotoPicker/Picker/Lite (4.0.4):
- HXPhotoPicker/Picker/Lite (4.0.5):
- HXPhotoPicker/Core
- Kingfisher (7.8.0)

@@ -49,7 +49,7 @@ EXTERNAL SOURCES:
:path: "./"

SPEC CHECKSUMS:
HXPhotoPicker: 66b395a1248bed42cc4c3b0a89c40197fa11a99c
HXPhotoPicker: b338cd7d1e6119e3e748b496898281607122a619
Kingfisher: 0656e1b064bfc1ca1cd04e033f617a86559696e9

PODFILE CHECKSUM: 576bacf77cf4ff94e5d1c0f663045b965805de0a
4 changes: 2 additions & 2 deletions Pods/Local Podspecs/HXPhotoPicker.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 22 additions & 22 deletions Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 5 additions & 15 deletions Sources/HXPhotoPicker/Core/Util/AssetManager+ImageURL.swift
Original file line number Diff line number Diff line change
@@ -46,7 +46,6 @@ public extension AssetManager {
}

/// 获取原始图片地址
/// PhotoManager.shared.isConverHEICToPNG = true 内部自动将HEIC格式转换成PNG格式
/// - Parameters:
/// - asset: 对应的 PHAsset 数据
/// - fileURL: 指定本地地址
@@ -86,7 +85,8 @@ public extension AssetManager {
}
let imageURL: URL
let isHEIC = imageResource.uniformTypeIdentifier.uppercased().hasSuffix("HEIC")
if isHEIC, fileURL.pathExtension.uppercased() != "HEIC" {
let sourceIsHEIC = fileURL.pathExtension.uppercased() == "HEIC"
if isHEIC, !sourceIsHEIC {
let path = fileURL.path.replacingOccurrences(of: fileURL.pathExtension, with: "HEIC")
imageURL = .init(fileURLWithPath: path)
}else {
@@ -100,17 +100,7 @@ public extension AssetManager {
options: options
) { error in
#if HXPICKER_ENABLE_PICKER
if isHEIC && PhotoManager.shared.isConverHEICToPNG {
var pngPath = imageURL.path.replacingOccurrences(of: imageURL.pathExtension, with: "PNG")
if FileManager.default.fileExists(atPath: pngPath) {
if let range = pngPath.range(of: ".PNG") {
pngPath.removeSubrange(range)
pngPath += "\(Int(Date().timeIntervalSince1970))" + ".PNG"
}else {
try? FileManager.default.removeItem(atPath: pngPath)
}
}
let pngURL = URL(fileURLWithPath: pngPath)
if isHEIC, !sourceIsHEIC {
let image = UIImage(contentsOfFile: imageURL.path)?.normalizedImage()
try? FileManager.default.removeItem(at: imageURL)
guard let data = PhotoTools.getImageData(for: image) else {
@@ -120,9 +110,9 @@ public extension AssetManager {
return
}
do {
try data.write(to: pngURL)
try data.write(to: fileURL)
DispatchQueue.main.async {
resultHandler(.success(pngURL))
resultHandler(.success(fileURL))
}
} catch {
DispatchQueue.main.async {
Loading

0 comments on commit b8f600d

Please sign in to comment.