Function Repository Resource:

InstEffect

Source Notebook

Apply Instagram-like effects to your photos

Contributed by: Michael Sollami and Jesse Friedman

ResourceFunction["InstEffect"][image,effect]

applies the named effect to the image.

ResourceFunction["InstEffect"][effect]

represents an operator form of ResourceFunction["InstEffect"] that can be applied to an image.

Details and Options

The effect definitions are adapted from CSSGram.
ResourceFunction["InstEffect"] maintains generic properties of the input such as ImageDimensions or ImageSize.

Examples

Basic Examples (2) 

Apply the Kelvin Instagram filter to an image:

In[1]:=
i = Image[Import["https://una.im/CSSgram/img/atx.jpg"], ImageSize -> 300];
Row@{i, ResourceFunction["InstEffect"][i, "Kelvin"]}
Out[2]=

Apply several filters to an image:

In[3]:=
i = Import["https://una.im/CSSgram/img/lakegeneva.jpg"];
Labeled[ResourceFunction["InstEffect"][i, #], #] & /@ {"NoFilter", "1977", "Brannan", "Clarendon"}
Out[4]=

And compare to the Instagram output:

Scope (3) 

Get a list of supported effect names:

In[5]:=
namedEffects = ResourceFunction["InstEffect"][]
Out[5]=

Visualize them all:

In[6]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/4dfd82a3-411b-47fb-b8ce-25c6c0a02e18"]
In[7]:=
ImageCollage[
 Table[ResourceFunction["InstEffect"][e]@
   img, {e, {None}~Join~namedEffects}], ImagePadding -> 10, Background -> Black, Method -> "Rows"]
Out[7]=

Randomly apply one of these effects with the operator form:

In[8]:=
ResourceFunction["InstEffect"][RandomChoice[namedEffects]]@img
Out[8]=

Possible Issues (1) 

Only a subset of the full list of named effects are implemented:

Neat Examples (1) 

Apply affects to your webcam feed:

In[9]:=
Mouseover[CurrentImage[], Dynamic[ResourceFunction["InstEffect"][CurrentImage[], "Clarendon"]]]

Publisher

Michael Sollami

Version History

  • 1.0.0 – 14 December 2020

Related Resources

Author Notes

Once the new gradient fillings are available in version 12.2, will update the rest of the missing effects.

License Information