This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageOps, ImageFilter | |
import os, sys | |
import numpy as np | |
from datetime import datetime | |
# Dodge blend effect | |
def dodge(front,back): | |
# The formula comes from http://www.adobe.com/devnet/pdf/pdfs/blend_modes.pdf | |
result = (back*256.0)/(256.0-front) | |
result[result>255]=255 |