title: How to use image magick to generically convert images
body: <p>I want to convert images with generic extensions, I have this:</p>
  
  <pre><code>cat "$1" | convert 'jpeg:-' -resize '64x64' - | gsutil cp - "gs://images.xxx.com/${sha_sum}-64x64-${file_without_folder}"
  </code></pre>
  
  <p>the above works. But if I omit the 'jpeg:-' it won't work. Is there a way to generically convert any file type? Perhaps I need the 'jpeg:-' so that image magick knows what the file encoding type is? Is there a way for image magick to auto-detect the encoding perhaps?</p>
  
  <p>I am looking to do this:</p>
  
  <pre><code>cat "$1" | convert -resize '64x64' - | gsutil cp - "gs://images.xxx.com/${sha_sum}-64x64-${file_without_folder}"
  </code></pre>
  
  <p>so that I can generically upload an image no matter the file type (encoding type).</p>