Guest User

Untitled

a guest
Jan 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $image = new Imagick();
  2. $image->newImage(1100, 460, new ImagickPixel('red'));
  3. $image->setImageFormat("jpg");
  4. $type=$image->getFormat();
  5. header("Content-type: $type");
  6. $iw = $image->getimagewidth();
  7. $ih = $image->getimageheight();
  8. $inw = $iw / $ih * 460;
  9. $texture = new Imagick();
  10. $texture->readImage($pathToImage);
  11. $texture->scaleImage($inw, 460);
  12. $image = $image->textureImage($texture);
  13.  
  14. echo $image;
Add Comment
Please, Sign In to add comment