Android: setPictureFormat() error
<p>I'm a beginner in Andoird, currently trying to write an application using the Camera class of Android in Eclipse. The problem is when I call the parameters.setPictureFormat() method with ImageFormat.JPEG as the argument, I get an error.</p>

<p>Here's how my code looks like:</p>

<pre><code>  public void surfaceChanged(SurfaceHolder holder, int format, int w, int h){
   Camera.Parameters parameters = mCamera.getParameters();

   parameters.setPreviewSize(854,480);  // (h,w)
   parameters.setPictureFormat(ImageFormat.JPEG);
   parameters.set("jpeg-quality", 100);
   parameters.set("orientation", "lanscape");
   parameters.set("rotation", 90);
   mCamera.setParameters(parameters);
   mCamera.startPreview();
}
</code></pre>

<p>And I get this error in return:</p>

<pre><code>ImageFormat cannot be resolved to a variable
</code></pre>

<p>I've tried using PixelFormat.JPEG as well, but I get the same error that says "PixelFormat cannot be resolved to a variable". I've checked, it's not importing android.R. I also tried importing android.graphics.ImageFormat but it doesn't work.</p>

<p>Could anybody help point out what the problem is?</p>
