def test_color_fx_math(ctx): gold = RGBColor.parse('gold') def gold_filter(self, *a): return gold * 0.7 img = get_image('test.png') img[0].translucent = False img = evaluate(gold_filter, *img) ctx.compare(img, 'color_fx_math.miff')
def test_color_fx_constant(ctx): gold = RGBColor.parse('gold') def gold_filter(self, *a): return gold img = get_image('test.png') img[0].translucent = False img = evaluate(gold_filter, *img) ctx.compare(img, 'color_fx_constant.miff')
def test_color_fx_constant(ctx): gold = RGBColor.parse('gold') @image_filter def gold_filter(self, *a): return gold img = get_image('test.png') img[0].translucent = False img = gold_filter(*img) ctx.compare(img, 'color_fx_constant.miff')
def test_color_fx_math(ctx): gold = RGBColor.parse('gold') @image_filter def gold_filter(self, *a): return gold * 0.7 img = get_image('test.png') img[0].translucent = False img = gold_filter(*img) ctx.compare(img, 'color_fx_math.miff')
def test_khaki_to_tomato(ctx): img = Image.new((100, 100), fill=RGBColor.parse('khaki')) img[0].replace_color(RGBColor.parse('khaki'), RGBColor.parse('tomato')) ctx.compare(img, 'canvas_opaque.miff')
def test_wheat(ctx): img = Image.new((100, 100), fill=RGBColor.parse('wheat')) ctx.compare(img, 'canvas_wheat.miff')
def test_khaki(ctx): img = Image.new((100, 100), fill=RGBColor.parse('khaki')) ctx.compare(img, 'canvas_khaki.miff')
def test_color_colorize(ctx): img = get_image('test.png') img[0].translucent = False img = Colorize(RGBColor.parse('sienna'), 1.0)(*img) ctx.compare(img, 'color_colorize.miff')
def test_khaki_to_tomato(ctx): img = Image.new((100, 100), fill=RGBColor.parse('khaki')) img[0].replace_color(RGBColor.parse('khaki'), RGBColor.parse('tomato')) ctx.compare(img, 'canvas_opaque.miff')
def test_wheat(ctx): img = Image.new((100, 100), fill=RGBColor.parse('wheat')) ctx.compare(img, 'canvas_wheat.miff')
def test_khaki(ctx): img = Image.new((100, 100), fill=RGBColor.parse('khaki')) ctx.compare(img, 'canvas_khaki.miff')
def test_color_colorize(ctx): img = get_image('test.png') img[0].translucent = False img = Colorize(RGBColor.parse('sienna'), 1.0)(*img) ctx.compare(img, 'color_colorize.miff')