What are alternative solutions to using "myscrapbook" for image manipulation in PHP?

The issue with using "myscrapbook" for image manipulation in PHP is that it is not a widely recognized or reliable library for image processing tasks. To solve this problem, a better alternative would be to use a well-established and robust PHP library like "GD" or "Imagick" for image manipulation.

// Using GD library for image manipulation in PHP
$image = imagecreatefromjpeg('image.jpg');
$width = imagesx($image);
$height = imagesy($image);

// Resize the image
$newWidth = 200;
$newHeight = ($height / $width) * $newWidth;
$newImage = imagecreatetruecolor($newWidth, $newHeight);
imagecopyresampled($newImage, $image, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);

// Save the resized image
imagejpeg($newImage, 'resized_image.jpg');

// Free up memory
imagedestroy($image);
imagedestroy($newImage);