$image = \GdImage::newFromName('/path/to/test.jpg');
$image = \Imagick::newFromName('/path/to/sample.png');From the examples, it is clear that the package library used is either GD or Imagick depending on the type of image the function is creating. Both GD and Imagick are PHP extensions used for creating, manipulating and processing images. GD is a smaller and faster library with basic image processing capabilities, while Imagick is more powerful and has advanced features for image processing such as custom image filters, layered composition, metadata editing, etc.