Search Results
This function will make the image wrap around from bottom to top or side to side, hence "roll". If you want to just offset an image without the wrap-around, use Imagick::extentImage instead.
Imagick::rollImage ← resizeImage rotateImage → Offsets an image as defined by x and y.
Jul 11, 2025 · Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.
Imagick::rollImage (PECL imagick 2, PECL imagick 3) Imagick::rollImage — Offsets an image Description public Imagick::rollImage ( int $x , int $y ) : bool Offsets an image as defined by x and y. Parameters x The X offset. y The Y offset. Return Values Returns true on success.
In this example, an image is taken as input by creating a new imagick object. Then, rollImage () function is applied on it with the help of specified a and y offsets (x=30, y=40).
User Contributed Notes There are no user contributed notes for this page.
People also ask
What is rollimage() function in ImageMagick?
How to roll an image in ImageMagick?
How to rotate an image in IMagick?
Examples Example #1 Imagick::rollImage () <?php functionrollImage($imagePath,$rollX,$rollY) { $imagick= new \Imagick(realpath($imagePath)); $imagick->rollimage($rollX,$rollY); header("Content-Type: image/jpg"); echo$imagick->getImageBlob(); } ?>
