code: public function makeSprite($path, $file) {
          $sprite = $this->create_image();
          $func = "image" . $this->image_type;
          $func($sprite, $path . $file . '.' . $this->image_type);
          $this->spriteFilename = $file . '.' . $this->image_type;
          ImageDestroy($sprite);
      }
docs: /*
  saves image to path