FilterFX is a Python package that allows users and developers to enhance images by applying a variety of filters easily.
Before installing, ensure you have the following:
- Python 3.12.8 or later installed.
- A virtual environment is recommended.
To install FilterFX, simply run:
pip install filterfx
First, import the package:
import filterfx as ffx
You can apply filters using either a PIL image object or directly from an image path.
from PIL import Image
image = Image.new("path/to/your/image.jpg")
image = ffx.apply_filter(image, ffx.FILTERS.SEPIA)
image.show()
image = ffx.apply_filter_from_path("path/to/your/image2", ffx.FILTERS.GRAYSCALE)
You can save the processed image or display it in a window:
#Save the filtered image
image = Image.new("path/to/your/image")
image = ffx.apply_filter(image, ffx.FILTERS.SEPIA, output="path/to/save/image")
#Show the filtered image in a new window
image = ffx.apply_filter_from_path("path/to/your/image2", ffx.FILTERS.GRAYSCALE, show=True)
Filter Name | Description |
---|---|
ffx.FILTERS.SEPIA |
Applies a warm, brownish tone to create an old-fashioned look. |
ffx.FILTERS.GRAYSCALE |
Converts the image into a monochrome black & white style. |
ffx.FILTERS.INVERT |
Reverses the colors, creating a negative effect. |
ffx.FILTERS.VINTAGE |
Adds a retro-style filter with faded colors and soft contrast. |
ORIGINAL IMAGE
SEPIA FILTER
GRAYSCALE FILTER
For additional examples, check out .
FilterFX is released under the MIT License.
- Fabio Rojas - Creator
The images used in this project are from the game Milk outside a bag of milk outside a bag of milk, developed by Nikita Kryukov.
All rights belong to their respective owners.