001 package railo.runtime.functions.image; 002 003 import java.awt.Color; 004 005 import railo.commons.color.ColorCaster; 006 import railo.runtime.PageContext; 007 import railo.runtime.exp.PageException; 008 import railo.runtime.img.Image; 009 import railo.runtime.op.Caster; 010 011 public class ImageSetBackgroundColor { 012 013 public static String call(PageContext pc, Object name, String strColor) throws PageException { 014 if(name instanceof String) name=pc.getVariable(Caster.toString(name)); 015 Image img = Image.toImage(name); 016 017 Color color = ColorCaster.toColor(strColor); 018 019 img.setBackground(color); 020 return null; 021 } 022 }