Paparazzo alternatives and similar libraries
Based on the "Image" category.
Alternatively, view Paparazzo alternatives based on common mentions on social networks and blogs.
-
GPUImage2
GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing. -
TOCropViewController
A view controller for iOS that allows users to crop portions of UIImage objects -
IDMPhotoBrowser
Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress and more -
SKPhotoBrowser
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift -
AspectFillFaceAware
DISCONTINUED. An extension that gives UIImageView the ability to focus on faces within an image. -
GPUImage3
GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal. -
RSKImageCropper
An image cropper / photo cropper for iOS like in the Contacts app with support for landscape orientation. -
EBPhotoPages
A photo gallery for iOS with a modern feature set. Similar features as the Facebook photo browser. -
Twitter Image Pipline
Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients -
ImagePickerSheetController
ImagePickerSheetController replicates the custom photo action sheet in iMessage. -
YUCIHighPassSkinSmoothing
An implementation of High Pass Skin Smoothing using Apple's Core Image Framework -
CTPanoramaView
A library that displays spherical or cylindrical panoramas with touch or motion based controls. -
AXPhotoViewer
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos. -
OnlyPictures
A simple and flexible way to add source of overlapping circular pictures, currently supports horizontal overlapping or distant pictures with great layout flexibility. -
ComplimentaryGradientView
Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Paparazzo or a related project?
README
Overview
Paparazzo is a component for picking and editing photos.
Key Features | |
---|---|
:camera: | Taking photos using camera |
:iphone: | Picking photos from user's photo library |
:scissors: | Photo cropping and rotation |
:droplet: | Applying filters to photos |
[Demo](PaparazzoDemo.gif)
Contents
Installation
There are two options to install Paparazzo using CocoaPods.
Using Marshroute:
pod "Paparazzo"
or if you don't use Marshroute and prefer not to get it as an additional dependency:
pod "Paparazzo/Core"
Usage
You can use either the entire module or photo library exclusively.
Presenting entire module
Initialize module assembly using Paparazzo.AssemblyFactory
(or Paparazzo.MarshrouteAssemblyFactory
if you use Marshroute):
let factory = Paparazzo.AssemblyFactory()
let assembly = factory.mediaPickerAssembly()
Create view controller using assembly's module
method:
let data = MediaPickerData(
items: items,
autocorrectionFilters: filters,
selectedItem: items.last,
maxItemsCount: maxItemsCount,
cropEnabled: true,
autocorrectEnabled: true,
cropCanvasSize: cropCanvasSize
)
let viewController = assembly.module(
data: data,
routerSeed: routerSeed, // omit this parameter if you're using Paparazzo.AssemblyFactory
configure: configure
)
Method parameters:
- items β array of photos that should be initially selected when module is presenter.
- filters β array of filters that can be applied to photos.
- selectedItem β selected photo. If set to
nil
or if items doesn't contain any photo with matching identifier, then the first photo in array will be selected. - maxItemsCount β maximum number of photos that user is allowed to pick.
- cropEnabled β boolean flag indicating whether user can perform photo cropping.
- autocorrectEnabled β boolean flag indicating whether user can apply filters to photo .
- cropCanvasSize β maximum size of canvas when cropping photos. (see Memory constraints when cropping).
- routerSeed β routerSeed provided by Marshroute.
- configure β closure that allows you to provide module's additional parameters.
Additional parameters of MediaPicker module
Additional parameters is described in protocol MediaPickerModule
:
setContinueButtonTitle(_:)
,setContinueButtonEnabled(_:)
,setContinueButtonVisible(_:)
andsetContinueButtonStyle(_:)
allow to customize "Continue" button text and availability.setAccessDeniedTitle(_:)
,setAccessDeniedMessage(_:)
andsetAccessDeniedButtonTitle(_:)
allow to customize "Access Deined" view texts.setCropMode(_:)
allow to customize photo crop behavior.onItemsAdd
is called when user picks items from photo library or takes a new photo using camera.onItemUpdate
is called after user performed cropping.onItemAutocorrect
is called after applying filter.onItemMove
is called after moving photo.onItemRemove
is called when user deletes photo.onFinish
andonCancel
is called when user taps Continue and Close respectively.
Memory constraints when cropping
When cropping photo on devices with low RAM capacity your application can crash due to memory warning. It happens because in order to perform actual cropping we need to put a bitmap of the original photo in memory. To descrease a chance of crashing on older devices (such as iPhone 4 or 4s) we can scale the source photo beforehand so that it takes up less space in memory. cropCanvasSize is used for that. It specifies the size of the photo we should be targeting when scaling.
Presenting photo library
Initialize module assembly using Paparazzo.AssemblyFactory
(or Paparazzo.MarshrouteAssemblyFactory
if you use Marshroute):
let factory = Paparazzo.AssemblyFactory()
let assembly = factory.photoLibraryAssembly()
Create view controller using assembly's module
method:
let viewController = assembly.module(
selectedItems: selectedItems,
maxSelectedItemsCount: maxSelectedItemsCount,
routerSeed: routerSeed, // omit this parameter if you're using Paparazzo.AssemblyFactory
configure: configure
)
- selectedItems β preselected photos (or
nil
). - maxItemsCount β maximum number of photos that user is allowed to pick.
- routerSeed β routerSeed provided by Marshroute.
- configure β closure used to provide additional module setup.
Presenting mask cropper
MaskCropper is a module which provides easy way to customize cropping experience. See CroppingOverlayProvider protocol to get more details.
Initialize module assembly using Paparazzo.AssemblyFactory
(or Paparazzo.MarshrouteAssemblyFactory
if you use Marshroute):
let factory = Paparazzo.AssemblyFactory()
let assembly = factory.maskCropperAssembly()
Create view controller using assembly's module
method:
let data = MaskCropperData(
imageSource: photo.image,
cropCanvasSize: cropCanvasSize
)
let viewController = assembly.module(
data: data,
croppingOverlayProvider: croppingOverlayProvider,
routerSeed: routerSeed, // omit this parameter if you're using Paparazzo.AssemblyFactory
configure: configure
)
- imageSource β photo that should be cropped.
- croppingOverlayProvider β provider from CroppingOverlayProvidersFactory.
- routerSeed β routerSeed provided by Marshroute.
- configure β closure used to provide additional module setup.
Presenting scanner
Scanner is a module which provides easy way to handle realtime stream from camera. See ScannerOutputHandler protocol to get more details.
[Demo](ScannerDemo.gif)
Initialize module assembly using Paparazzo.AssemblyFactory
(or Paparazzo.MarshrouteAssemblyFactory
if you use Marshroute):
let factory = Paparazzo.AssemblyFactory()
let assembly = factory.scannerAssembly()
Create view controller using assembly's module
method:
let data = ScannerData(
initialActiveCameraType: .back,
cameraCaptureOutputHandlers: []
)
let viewController = assembly.module(
data: data,
routerSeed: routerSeed, // omit this parameter if you're using Paparazzo.AssemblyFactory
configure: configure
)
- initialActiveCameraType β preferred camera when starting the module (front or back).
- cameraCaptureOutputHandlers β array of handlers that confirm the ScannerOutputHandler protocol.
- routerSeed β routerSeed provided by Marshroute.
- configure β closure used to provide additional module setup.
UI Customization
You can customize colors, fonts and icons used in photo picker. Just pass an instance of PaparazzoUITheme
to the initializer of assembly factory.
var theme = PaparazzoUITheme()
theme.shutterButtonColor = .blue
theme.accessDeniedTitleFont = .boldSystemFont(ofSize: 17)
theme.accessDeniedMessageFont = .systemFont(ofSize: 17)
theme.accessDeniedButtonFont = .systemFont(ofSize: 17)
theme.cameraContinueButtonTitleFont = .systemFont(ofSize: 17)
theme.cancelRotationTitleFont = .boldSystemFont(ofSize: 14)
let assemblyFactory = Paparazzo.AssemblyFactory(theme: theme)
ImageSource
Photos picked by user via Paparazzo is provided to you either as MediaPickerItem
(when using MediaPicker module) or as PhotoLibraryItem
(when using PhotoLibrary module). Both of these enitities are just wrappers around ImageSource
, which is a protocol that allows you to get different image representations regardless of where it comes from. To find out how to use it go to https://github.com/avito-tech/ImageSource
Localization
You can see the list of supported languages [here](Paparazzo/Localization). If you don't see your language, we encourage you to contribute to the project by creating pull request that adds Localizable.strings
file for that language.
If you're not satisfied with a string that is provided by Paparazzo, you can override it in your project. Just add Paparazzo.strings
to your main bundle. Override only the strings you need (you can see an example of this in PaparazzoExample project).
License
MIT
*Note that all licence references and agreements mentioned in the Paparazzo README section above
are relevant to that project's source code only.