Creating batches for int8 calibration

I’m trying to calibrate my classification network for int8 inference (using caffe).
I used the C++ sample and it worked perfectly on MNIST.
However, I need to perform this on my own data and therefore I need to create the batches for calibration.
I can’t find any example of how to do this.
I saw that the MNIST batch file contains: num of batches, num of channels, width , height, pixels in float format, labels in float format.
However I’m dealing with color images so I don’t know:

  1. is it RGB or BGR?
  2. what is the expected dynamic range of the pixels: do I need to normalize them from 0-255 to 0-1? do I need to subtract the mean values from the pixels before writing them to the file? do I need to do both?
  3. anything else I’m missing?

Thanks in advance,