Basically, what I am trying to is learn how to open an image manually WITHOUT LIBRARIES and see the RGB contents. 

I want to do this so I can calculate the Hue and Saturation of the RGB to write back a 2D array image.

So far I have got this:

```
#include <iostream>
#include <stdio.h>      /* printf */
#include <math.h>       /* acos */
#include <fstream>      /* for file I/O */

using namespace std;

int main() {
        FILE* fp = NULL;
        fp = fopen("soccerball.png", "rb");
        cout << "done" << endl;
        return 0;
}

```

I know it is not much, as I'm used to Python more. But I honestly don't know where to start. And there are literally no examples of this it seems on the internet. 

So I read an image. Now I want something like:

> 
> img[Height][width]
> 
> 
> 

so I can get 

> 
> img\_r[h][w], img\_g[h][w], img\_b[h][w]
> 
> 
> 

So I can use those values to calculate a Hue 2d array in same format. 

> 
> img\_hue[h][w] 
> 
> 
> 

Thanks