added possibility to fill with gd resource