utilizzando imagemagick oppure gd2.