Loading 2D Array From File w/ Double Pointer

Hi there. I've been trying for a while to nail down a loading function for my project. I have other manipulation functions which should work, but the sticking point for me is getting the data to import. I just don't have a complete understanding of it.

Basically, I want to assign a 2D array to my double pointer, of which I know the size (but I could choose to change the dimensions before testing). The file is comma delimited, and looks something like this:

I have a feeling I could be close, but I'm concerned about the actual assignment, which I have not included. I need to load each value in the array with one of the separate integers separated by commas.

Previously, I had a statement something like *(*(imgPix + numberOfRows) + numberOfCols) in the inner loop, but it didn't seem to work. I'm also not sure if the inner loop is the place for it to go, but given the location of my iterators, it seems likely.