Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 7th, 2012  |  syntax: None  |  size: 0.30 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $im = new Imagick();
  2. $im->setResolution(300,300);
  3.                        
  4. $im->readImage('mypdf.pdf');
  5. $im->setImageUnits(imagick::RESOLUTION_PIXELSPERINCH);
  6. $im->adaptiveResizeImage(707,1000);
  7. $im->setResolution(300,300);
  8. $im->setImageFormat( "jpg" );
  9. $originalImageFile = 'myjpg.jpg';
  10. $im->writeImage($originalImageFile);