vbalnt / filterizer

Python script to extract image filters from photoshop .acv files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filterizer

Intro

Using this code, you can start creating your own image filters like the ones you see in apps like Instagram, Hipstamatic etc.

What you need is Python, and some curve files. To get you started there is already a sample curve file ( Country.acv ) inside the repo.

Curve files are some special Photoshop files that alter the appearance of the image. You can find lots of them for free, and there is no need to have Photoshop installed in order to create filters from them.

For an example of what can be done with .acv files take a look at the following presets sample photoshop curves.

Photoshop curve files

The code reads a .acv file and outputs the polynomials that adjust the colours of an image. There polynomials can then be used to produce filters for images in every language you prefer.

Curve file specification from Adobe

Usage

Using the extractCurvesFromACVFile.py Python code, you can extract the polynomials you need, and then you can use them in your code to alter the image.

Sample filtering output

surrey.pngsurrey_filtered.png

iOS example

There is also an example included on how to use a curve extracted from an .acv file in objective-C. Warning: The iPhone code is slow and unoptimized. It is mainly intented as a proof of concept.

Python filtering example

Github user @pfdevilliers has wrapped together a nice python script using the curve reading code above. Take a look here.

About

Python script to extract image filters from photoshop .acv files


Languages

Language:Objective-C 58.7%Language:Python 41.3%