Adjusting contrast of Image from Byte Array of the image
<p>Can I change the contrast of an image from the byte stream of the Image? I have done   necessary to do copying the image and I need to add the change contrast part to the code.
Any idea how to do this? Or is it even possible?</p>

<pre><code>package make.image.bw;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;

public class MakeImageBWActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);                  // set screen view
        String imageInSD      =     Environment.getExternalStorageDirectory().getAbsolutePath() +"/earthglobe.jpg";
        RandomAccessFile file =     null;
        try {
            file = new RandomAccessFile(imageInSD, "r");
        } catch (FileNotFoundException e1) {
            e1.printStackTrace();
        }
        File myFile               =     new File(Environment.getExternalStorageDirectory(), "latestearth.jpg");
        byte[] buffer             =     new byte[1024];
        try {
            FileOutputStream out  =     new FileOutputStream(myFile);
            while(file.read(buffer)!=-1){
                out.write(buffer,0,1024);
            }
             out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        Log.d("tag", "finished");
        finish();
        }
}
</code></pre>

<p>Thanking You in advance for your valuable suggestions.</p>
