title: Imagemagick exec and convert
body: <p>I recently started using imagemagick with php and
  I'm relatively new with both of these, IM and PHP.
  So, I'm here to ask for some help/suggestion(s).</p>
  <h1>First</h1>
  <p>If lets say a user   uploads a gif or a png image on
  my site and I want it converted to jpg, is there any
  command like for example.<code>$image-&gt;convert($file,'.jpg)</code>
  or the convert command is accesible only thru <code>exec()</code> ?
  like for example <code>exec(convert picture.png</code> to picture.jpg)</p>
  <h1>Second</h1>
  <p>What if for again, the user uploads gif/png on the site
  and I resize the image to a specified width/height  and
  write the image, with the writeImage function of IM like this:
  <code>$image-&gt;writeImage(basename.$ext)</code> where <code>$ext</code> = jpg.
  Will this work properly,is this a good practice? I assume  this will
  only rename it but still, I don't see a problem in this... o.O</p>
  <p>Oh sorry one more question, I'm not very familiar with exec,
  is it better using imagemagick using <code>exec()</code>, does it improve
  speed, load etc?</p>