All Projects → hyperoslo → Gallery

hyperoslo / Gallery

Licence: other
📹 Your next favorite image and video picker

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Gallery

Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+177.35%)
Mutual labels:  imagepicker
Imagepicker
📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera
Stars: ✭ 623 (-52.8%)
Mutual labels:  imagepicker
Wclimagepickercontroller
可自定义的图片选择器
Stars: ✭ 49 (-96.29%)
Mutual labels:  imagepicker
Zlphotobrowser
Wechat-like image picker. Support select normal photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
Stars: ✭ 3,962 (+200.15%)
Mutual labels:  imagepicker
Imagepicker
📷 Reinventing the way ImagePicker works.
Stars: ✭ 4,634 (+251.06%)
Mutual labels:  imagepicker
Lpalbum
an albums that can preview, multiple-choice
Stars: ✭ 17 (-98.71%)
Mutual labels:  imagepicker
Photopicker
[DEPRECATED] Image Picker like Wechat
Stars: ✭ 2,852 (+116.06%)
Mutual labels:  imagepicker
Rximagepicker
Android图片相册预览选择器、支持AndroidX,支持图片的单选、多选、图片预览、图片文件夹切换、在选择图片时调用相机拍照
Stars: ✭ 85 (-93.56%)
Mutual labels:  imagepicker
Androidpicker
安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.
Stars: ✭ 5,320 (+303.03%)
Mutual labels:  imagepicker
Pgimagepicker
类似于微博、微信的多图浏览/查看
Stars: ✭ 39 (-97.05%)
Mutual labels:  imagepicker
Insgallery
📸 Instagram-like image picker for Android (一款 UI 炫酷高仿 Instagram 的图片、视频选择器)
Stars: ✭ 409 (-69.02%)
Mutual labels:  imagepicker
Piximagepicker
Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.
Stars: ✭ 488 (-63.03%)
Mutual labels:  imagepicker
Yimagepicker
小红书多图剪裁+微信图片选择器+大图预览+图片剪裁(支持圆形剪裁和镂空剪裁),已适配androidQ,借鉴并升级matisse加载内核!超强定制性可轻松实现知乎/马蜂窝/微博等特殊样式!支持跨进程回调!内部结构轻量级,无任何第三方开源库!支持support依赖!
Stars: ✭ 975 (-26.14%)
Mutual labels:  imagepicker
Imagepicker
高仿微信图片选择器(支持单图,多图,视频选择,支持图片自由缩放,视频播放等功能)
Stars: ✭ 372 (-71.82%)
Mutual labels:  imagepicker
Rximagepicker
🚀RxJava2 and RxJava3 external support. Android flexible picture selector, provides the support for theme of Zhihu and WeChat (灵活的Android图片选择器,提供了知乎和微信主题的支持).
Stars: ✭ 1,098 (-16.82%)
Mutual labels:  imagepicker
Coco
基于kotlin、简洁易用的调用系统拍照或图片选择库
Stars: ✭ 276 (-79.09%)
Mutual labels:  imagepicker
Imagepicker
Super Image Picker is a powerful image selector. Support for huge image preview (such as 10000 * 5000px), support for image cropping, configurable avatar mode and normal mode, support for a variety of image load library
Stars: ✭ 891 (-32.5%)
Mutual labels:  imagepicker
Imageselector
🌁 Android 图片选择器。充分自由定制,极大程度简化使用,支持图库多选/图片预览/单选/照片裁剪/拍照/自定义图片加载方式/自定义色调/沉浸式状态栏
Stars: ✭ 1,310 (-0.76%)
Mutual labels:  imagepicker
Picker
Picker - A CameraX based WhatsApp Style Image-Video Picker
Stars: ✭ 69 (-94.77%)
Mutual labels:  imagepicker
Tzimagepickercontroller
一个支持多选、选原图和视频的图片选择器,同时有预览、裁剪功能,支持iOS6+。 A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS6+
Stars: ✭ 7,740 (+486.36%)
Mutual labels:  imagepicker
Gallery Banner

Version Carthage Compatible License Platform Swift

Description

Gallery Icon

We all love image pickers, don't we? You may already know of ImagePicker, the all in one solution for capturing pictures and selecting images. Well, it has a sibling too, called Gallery. Based on the same engine that powers ImagePicker, Gallery has a clearer flow based on albums and focuses on the use case of selecting video. If this suits your need, give it a try 😉

Gallery has 3 tabs with easy navigation through swipe gesture

  • Images: select albums and images. Handle selection with hightlighted numbers so your users don't forget the order
  • Camera: your photographer skill goes here
  • Videos: display all videos and select. For now the use case is to select one video at a time

And, it has zero dependencies 😎

Usage

Presenting

GalleryController is the main entry point, just instantiate and give it the delegate

let gallery = GalleryController()
gallery.delegate = self
present(gallery, animated: true, completion: nil)

The content controller is not loaded until the users navigate to, which offers a much faster experience.

Delegate

The GalleryControllerDelegate requires you to implement some delegate methods in order to interact with the picker

func galleryController(_ controller: GalleryController, didSelectImages images: [Image])
func galleryController(_ controller: GalleryController, didSelectVideo video: Video)
func galleryController(_ controller: GalleryController, requestLightbox images: [Image])
func galleryControllerDidCancel(_ controller: GalleryController)

The lightbox delegate method is your chance to display selected images. If you're looking for a nice solution, here is the Lightbox that we use and love

Resolving

The delegate methods give you Image and Video, which are just wrappers around PHAsset. To get the actual asset informations, we offer many convenient methods. See example

Image

  • Use instance method resolve to get the actual UIImage
  • Use static method Image.resolve to resolve a list of images

Video

  • Use instance method fetchDuration, fetchPlayerItem, fetchAVAsset, fetchThumbnail to get more information about the selected video.

Permission

Gallery handles permissions for you. It checks and askes for photo and camera usage permissions at first launch. As of iOS 10, we need to explicitly declare usage descriptions in plist files

<key>NSCameraUsageDescription</key>
<string>This app requires access to camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to photo library</string>

Configuration

There are lots of customization points in Config structs. For example

Config.Permission.image = UIImage(named: ImageList.Gallery.cameraIcon)
Config.Font.Text.bold = UIFont(name: FontList.OpenSans.bold, size: 14)!
Config.Camera.recordLocation = true
Config.tabsToShow = [.imageTab, .cameraTab]

Video Editor

Gallery cares more about video with its editing functionalities. We have VideoEditor and AdvancedVideoEditor to trim, resize, scale and define quality of the selected video

func galleryController(_ controller: GalleryController, didSelectVideo video: Video) {
  controller.dismiss(animated: true, completion: nil)

  let editor = VideoEditor()
  editor.edit(video: video) { (editedVideo: Video?, tempPath: URL?) in
    DispatchQueue.main.async {
      if let tempPath = tempPath {
        let controller = AVPlayerViewController()
        controller.player = AVPlayer(url: tempPath)

        self.present(controller, animated: true, completion: nil)
      }
    }
  }
}

With the Video object, you can fetchPlayerItem, fetchAVAsset and fetchThumbnail as well

And, of course, you have the ability to customize it

Config.VideoEditor.maximumDuration = 30
Config.VideoEditor.savesEditedVideoToLibrary = true

Installation

Gallery is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Gallery'

Gallery is also available through Carthage. To install just write into your Cartfile:

github "hyperoslo/Gallery"

Gallery can also be installed manually. Just download and drop Sources folders in your project.

Author

Hyper Interaktiv AS, [email protected]

Contributing

We would love you to contribute to Gallery, check the CONTRIBUTING file for more info.

License

Gallery is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].