Question: I'm writing a kernel for educational purposes and I want to integrate a disassembler into my kernel.  

Since I'm going to integrate it into the kernel I want it to be very small and simple,  

i.e I only need it to receive a memory address and return the assembly instruction at that address.  

I've looked for an open source that can do that but all I found is big libraries which are way too big and complicated.  

I'm talking about a few (2-4) source code files that does not require a complicated installation/integration and that is very limited in it's abilities and only provide the very basic functionalities.  

Does anybody know such an open source (for C of course)?

Answer: 
```
 if(imgFile.exists()){

    final BitmapFactory.Options options = new BitmapFactory.Options();
    options.inSampleSize = 8;

   Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath(),options);
        holder.imgIcon.setImageBitmap(myBitmap); 
        //myBitmap.recycle();
    }

```

Use inSampleSize to load scales bitmaps to memory. Using powers of 2 for inSampleSize values is faster and more efficient for the decoder. However, if you plan to cache the resized versions in memory or on disk, it’s usually still worth decoding to the most appropriate image dimensions to save space.

For more see [Loading Large Bitmaps Efficiently](http://developer.android.com/training/displaying-bitmaps/load-bitmap.html)
You will run into out of memory issues if you try to decode big images yourself.

Try using Universal Image loader. It will take care of all image loading from local storage or the internet. 

<https://github.com/nostra13/Android-Universal-Image-Loader>