All Projects → bmaslakov → cocoa-close-pixelate

bmaslakov / cocoa-close-pixelate

Licence: MIT license
Cocoa port of https://github.com/desandro/close-pixelate

Programming Languages

swift
15916 projects
shell
77523 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to cocoa-close-pixelate

Graver
Graver 是一款高效的 UI 渲染框架,它以更低的资源消耗来构建十分流畅的 UI 界面。Graver 独创性的采用了基于绘制的视觉元素分解方式来构建界面,得益于此,该框架能让 UI 渲染过程变得更加简单、灵活。https://cocoapods.org/pods/Graver
Stars: ✭ 1,482 (+3053.19%)
Mutual labels:  bitmap
Ezfilter
A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)
Stars: ✭ 155 (+229.79%)
Mutual labels:  bitmap
powerpaint
Kreative PowerPaint - Library and Application for Bitmap and Vector Image Editing
Stars: ✭ 27 (-42.55%)
Mutual labels:  bitmap
Lora Serialization
LoraWAN serialization/deserialization library for The Things Network
Stars: ✭ 120 (+155.32%)
Mutual labels:  bitmap
Easyrs
Convenience RenderScript tools for processing common Android formats such as Bitmap and NV21.
Stars: ✭ 144 (+206.38%)
Mutual labels:  bitmap
Pilosa
Pilosa is an open source, distributed bitmap index that dramatically accelerates queries across multiple, massive data sets.
Stars: ✭ 2,224 (+4631.91%)
Mutual labels:  bitmap
Circularimageview
This project allowing you to create circular and rounded corner Imageview in android through simplest way.
Stars: ✭ 90 (+91.49%)
Mutual labels:  bitmap
Doramon
个人工具汇总:一致性哈希工具,Bitmap工具,布隆过滤器参数生成器,Yaml和properties互转工具,一键式生成整个前后端工具,单机高性能幂等工具,zookeeper客户端工具,分布式全局id生成器,时间转换工具,Http封装工具
Stars: ✭ 53 (+12.77%)
Mutual labels:  bitmap
Android Close Pixelate
Android port of https://github.com/desandro/close-pixelate
Stars: ✭ 146 (+210.64%)
Mutual labels:  bitmap
Cherry
another bitmap font
Stars: ✭ 244 (+419.15%)
Mutual labels:  bitmap
Bitmap
C++ Bitmap Library
Stars: ✭ 125 (+165.96%)
Mutual labels:  bitmap
Kluban
Lifecycle + Kotlin 协程 + flow + LiveData + Glide 识别和内存优化 + Luban采样算法 = KLuban图片压缩
Stars: ✭ 144 (+206.38%)
Mutual labels:  bitmap
Resourcelib
C# File Resource Management Library
Stars: ✭ 197 (+319.15%)
Mutual labels:  bitmap
Fastbitset.js
Speed-optimized BitSet implementation for modern browsers and JavaScript engines
Stars: ✭ 118 (+151.06%)
Mutual labels:  bitmap
sparkar-pixelate-shader
simple script-only pixelate shader with Facebook SparkAR.
Stars: ✭ 35 (-25.53%)
Mutual labels:  pixelate
Drawablecolorchange
Android Library to dynamically change color of drawable.
Stars: ✭ 101 (+114.89%)
Mutual labels:  bitmap
Signatureview
SignatureView is an open source Android library which allow developers to produce pen and paper like effect for creating signatures on Android
Stars: ✭ 185 (+293.62%)
Mutual labels:  bitmap
AsciiMap
Creates ASCII Art from Bitmaps
Stars: ✭ 21 (-55.32%)
Mutual labels:  bitmap
CQULogo
重庆大学视觉标识素材包 --- Visual Identification Bundle of Chongqing University
Stars: ✭ 55 (+17.02%)
Mutual labels:  bitmap
Steganography
Least Significant Bit Steganography for bitmap images (.bmp and .png), WAV sound files, and byte sequences. Simple LSB Steganalysis (LSB extraction) for bitmap images.
Stars: ✭ 229 (+387.23%)
Mutual labels:  bitmap

cocoa-close-pixelate

License: MIT Bintray

This simple library allows you to easily create and combine various pixelation effects.

Based on a wonderful script by David DeSandro: close-pixelate.desandro.com.

You may be also be interested in the Android/Java version of the library.

Examples

Officer-old Officer-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.diamond, resolution: 48, size: 50),
                        PixelateLayer(.diamond, resolution: 48, offset: 24),
                        PixelateLayer(.diamond, resolution: 8, size: 6))
Stanley-old Stanley-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.square, resolution: 32),
                        PixelateLayer(.circle, resolution: 32, offset: 15),
                        PixelateLayer(.circle, resolution: 32, size: 26, offset: 13),
                        PixelateLayer(.circle, resolution: 32, size: 18, offset: 10),
                        PixelateLayer(.circle, resolution: 32, size: 12, offset: 8))
Stanley-old Stanley-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.square, resolution: 48),
                        PixelateLayer(.diamond, resolution: 48, offset: 12, alpha: 0.5),
                        PixelateLayer(.diamond, resolution: 48, offset: 36, alpha: 0.5),
                        PixelateLayer(.diamond, resolution: 16, size: 8, offset: 4))
Tony-old Tony-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.circle, resolution: 32, size: 6, offset: 8),
                        PixelateLayer(.circle, resolution: 32, size: 9, offset: 8),
                        PixelateLayer(.circle, resolution: 32, size: 12, offset: 24),
                        PixelateLayer(.circle, resolution: 32, size: 9, offset: 0))
Wonder-old Wonder-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.diamond, resolution: 24, size: 25),
                        PixelateLayer(.diamond, resolution: 24, offset: 12),
                        PixelateLayer(.square, resolution: 24, alpha: 0.6))
Anita-old Anita-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.square, resolution: 32),
                        PixelateLayer(.circle, resolution: 32, offset: 16),
                        PixelateLayer(.circle, resolution: 32, offset: 0, alpha: 0.5),
                        PixelateLayer(.circle, resolution: 16, size: 9, offset: 0, alpha: 0.5))
Giraffe-old Giraffe-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.circle, resolution: 24),
                        PixelateLayer(.circle, resolution: 24, size: 9, offset: 12))
Kendra-old Kendra-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.square, resolution: 48, offset: 12),
                        PixelateLayer(.circle, resolution: 48, offset: 0),
                        PixelateLayer(.diamond, resolution: 16, size: 15, offset: 0, alpha: 0.6),
                        PixelateLayer(.diamond, resolution: 16, size: 15, offset: 8, alpha: 0.6))
Gavin-old Gavin-new
Pixelate.create(pixels: bitmap,
                layers: PixelateLayer(.square, resolution: 48),
                        PixelateLayer(.diamond, resolution: 12, size: 8),
                        PixelateLayer(.diamond, resolution: 12, size: 8, offset: 6))

Download

The library is available via cocoapods:

pod 'ClosePixelate', '1.1.2'

Usage

There are several Pixelate.create* methods in the Pixelate class, allowing to create a pixelated bitmap from CGImage:

let pixelated = Pixelate.create(pixels: bitmap,
                                layers: PixelateLayer(.square, resolution: 48),
                                        PixelateLayer(.diamond, resolution: 48, offset: 12, alpha: 0.5),
                                        PixelateLayer(.diamond, resolution: 48, offset: 36, alpha: 0.5),
                                        PixelateLayer(.diamond, resolution: 16, size: 8, offset: 4))

You also can draw directly on a bitmap or on a canvas, using Pixelate.render* methods.

There are three basic layer types:

Original Square Diamond Circle
jamie simple-lo-square simple-lo-diamond simple-lo-circle

You can change size, resolution, offset and alpha parameters of each layer:

resolution = 10 resolution = 25 resolution = 20, size = 50, alpha = 0.5
simple-lo-square simple-hi-square jamie-new

You can also combine several layers into one image:

square, resolution = 25 diamond, resolution = 10
simple-hi-square + simple-lo-diamond = sample-multilayer
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].