Voltar ao ranking

longitachi/ZLPhotoBrowser

Swift

Wechat-like image picker. Support select photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;

imagepickereditimageeditvideophotosgiflivephotophotolibrarypickerswiftgalleryios
Crescimento de estrelas
Estrelas
5k
Forks
1k
Crescimento semanal
Issues
12
5k
18 de jul.19 de jul.20 de jul.21 de jul.
README

Version Carthage compatible SPM supported License Platform Language Usage

image


English | 简体中文

ZLPhotoBrowser is a Wechat-like image picker. Support select normal photos, videos, gif and livePhoto. Support edit image and crop video.

Directory

Detailed usage of Swift and OC, please refer to Wiki.

If you only want to use the image edit feature, please move to ZLImageEditor.

Features

  • Support SwiftUI.
  • Support iPad multi-window.
  • Portrait and landscape.
  • Two framework style.
  • Support page loading.
  • Preview selection (Support drag and drop).
  • Library selection (Support sliding selection).
  • Image/Gif/LivePhoto/Video.
  • Customize the maximum number of previews or selection, the maximum and minimum optional duration of the video.
  • Customize the number of columns displayed in each row.
  • Image editor (Draw/Crop/Image sticker/Text sticker/Mosaic/Filter/Adjust(Brightness, Contrast and Saturation)), (Draw color can be customized; Crop ratio can be customized; Filter effect can be customized; You can choose the editing tool you want).
  • Video editor.
  • Custom camera.
  • Multi-language.
  • Selected index.
  • Selected/unselectable state shadow mask.
  • The selected photos are displayed at the bottom of the big picture interface, which can be dragged and sorted.
  • The camera's internal photo cell can displays the captured images of the camera.
  • Customize font.
  • The color of each part of the framework can be customized (Provide dynamic color can support light/dark mode).
  • Customize images.

If you have good needs and suggestions in use, or encounter any bugs, please create an issue and I will reply in time.

Requirements

  • iOS 10.0
  • Swift 5.x
  • Xcode 14.x

Usage

  • Preview selection
let picker = ZLPhotoPicker()
picker.selectImageBlock = { [weak self] results, isOriginal in
    // your code
}
picker.showPreview(animate: true, sender: self)
  • Library selection
let picker = ZLPhotoPicker()
picker.selectImageBlock = { [weak self] results, isOriginal in
    // your code
}
picker.showPhotoLibrary(sender: self)
  • Pay attention, you need to add the following key-value pairs in your app's Info.plist
// If you don’t add this key-value pair, multiple languages are not supported, and the album name defaults to English
Localized resources can be mixed   YES

Privacy - Photo Library Usage Description

Privacy - Camera Usage Description

Privacy - Microphone Usage Description

Change Log

More logs

● 5.0.0
  Add:
    Optimized UI for iPad multitasking and custom window sizes.
    Updated partial APIs for iOS 26 and iOS 27 compatibility.
    Added parameter to control whether camera dismisses when app enters background.
    Added `supportLandscape` attribute; `enableWideCameras` now defaults to true.
    Added `thumbVCAllowPanToDismiss` property.
    Significantly optimized sticker and doodling editing experience.
    Updated album filtering logic to display more system albums.
  Fix:
    Fixed incorrect selection limit prompt when only videos are allowed. #1048
    Fixed transparent PNG images rendered with a white background. #1045
    Fixed selection state not syncing after deselecting in preview. #1042
● 4.7.4
  Add:
    Supports editing multiple videos.
    Change the license from MIT to Apache-2.0.
● 4.7.3
  Fix:
    Fixed the issue where the eraser position was displayed incorrectly when editing pictures.
...

Languages

🇨🇳 Chinese, 🇺🇸 English, 🇯🇵 Japanese, 🇫🇷 French, 🇩🇪 German, 🇷🇺 Russian, 🇻🇳 Vietnamese, 🇰🇷 Korean, 🇲🇾 Malay, 🇮🇹 Italian, 🇮🇩 Indonesian, 🇪🇸 Spanish, 🇵🇹 Portuguese, 🇹🇷 Turkish, 🇸🇦 Arabic, 🇳🇱 Dutch.

Installation

There are four ways to use ZLPhotoBrowser in your project:

  • using CocoaPods
  • using Carthage
  • using Swift Package Manager
  • manual install (build frameworks or embed Xcode Project)

CocoaPods

To integrate ZLPhotoBrowser into your Xcode project using CocoaPods, specify it to a target in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target 'MyApp' do
  # your other pod
  # ...
  pod 'ZLPhotoBrowser'
end

Then, run the following command:

$ pod install

If you cannot find the latest version, you can execute pod repo update first

Carthage

To integrate ZLPhotoBrowser into your Xcode project using Carthage, specify it in your Cartfile:

github "longitachi/ZLPhotoBrowser"

Then, run the following command to build the ZLPhotoBrowser framework:

$ carthage update

If you get an error like Building universal frameworks with common architectures is not possible. The device and simulator slices for "ZLPhotoBrowser" both build for: arm64 Rebuild with --use-xcframeworks to create an xcframework bundle instead. Click this link.

Swift Package Manager

  1. Select File > Add Packages. Enter https://github.com/longitachi/ZLPhotoBrowser.git in the "Choose Package Repository" dialog.
  2. In the next page, specify the version resolving rule as "Up to Next Major" with "5.0.0" as its earliest version.
  3. After Xcode checking out the source and resolving the version, you can choose the "ZLPhotoBrowser" library and add it to your app target.

Support

  • ★ Star this repo.
  • Support with or or

Demo Effect

  • Selection image image image

  • Image editor

image

  • Video editor

image

  • Multi-language

image

  • Custom camera

image

Repositórios relacionados
banchichen/TZImagePickerController

一个支持多选、选原图和视频的图片选择器,同时有预览、裁剪功能,支持iOS6+。 A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS6+

Objective-CMIT Licensephotokituiimagepickercontroller
8.2k1.9k
gzu-liyujiang/AndroidPicker

安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.

JavaMavenOtherwheelviewpicker
6.8k1.5k
hyperoslo/ImagePicker

:camera: Reinventing the way ImagePicker works.

SwiftOtheriosswift
4.9k674
Yummypets/YPImagePicker

📸 Instagram-like image picker & filters for iOS

SwiftMIT Licenseimagepickerpicker
4.5k1k
jeasonlzy/ImagePicker

完全仿微信的图片选择,并且提供了多种图片加载接口,选择图片后可以旋转,可以裁剪成矩形或圆形,可以配置各种其他的参数

JavaMavenApache License 2.0image-pickerimagepicker
4.3k1k
SilenceLove/HXPhotoPicker

图片/视频选择器 - 支持LivePhoto、GIF图片选择、3DTouch预览、在线下载iCloud上的资源、编辑图片/视频、浏览网络图片 功能 Imitation wx photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, Download the resources on iCloud online, browse the web image function

SwiftMIT Licensepicker3d-touch
github.com/SilenceLove/HXPhotoPicker
3.4k738
donglua/PhotoPicker

[DEPRECATED] Image Picker like Wechat

JavaMavenApache License 2.0photopickerimagepicker
play.google.com/store/apps/details
2.8k675
smuyyh/ImageSelector

:foggy: Android 图片选择器。充分自由定制,极大程度简化使用,支持图库多选/图片预览/单选/照片裁剪/拍照/自定义图片加载方式/自定义色调/沉浸式状态栏

JavaMavenApache License 2.0androidimagepicker
blog.csdn.net/yyh352091626/article/details/52154583
1.6k252
Dhaval2404/ImagePicker

📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera

KotlinApache License 2.0imagecamera
1.6k364
hyperoslo/Gallery

📹 Your next favorite image and video picker

SwiftOtheriosimagepicker
1.4k271
yangpeixing/YImagePicker

小红书多图剪裁+微信图片选择器+大图预览+图片剪裁(支持圆形剪裁和镂空剪裁),已适配androidQ,借鉴并升级matisse加载内核!超强定制性可轻松实现知乎/马蜂窝/微博等特殊样式!支持跨进程回调!内部结构轻量级,无任何第三方开源库!支持support依赖!

JavaMavenApache License 2.0imagepickerredbook
1.2k183
qingmei2/RxImagePicker

:rocket:RxJava2 and RxJava3 external support. Android flexible picture selector, provides the support for theme of Zhihu and WeChat (灵活的Android图片选择器,提供了知乎和微信主题的支持).

KotlinMIT Licenseimagepickerrximagepicker
1.2k154