Initializing gd image directly instead of calling function