Convert pandas dataframe to numpy array while preseving the datatype of the dataframe values

I am working on a complex image processing algorithm where in majority of the steps perform mathematical tasks to be performed on the image dataset. I am successful able to convert the image into set of values and store it into pandas dataframe. But when i am trying to convert these set of values to some data structure that can store these image data into specific array architecture i am not able to preserve the datatype of the values. My integer values in the dataframe are getting explicitly converted into integer values, due to which the algorithm is decreasing the accuracy of the results. I am using df.values for this task. I seek some guidance to preserve the data type of the dataframe value's while converting or better if we can convert the whole dataframe into a numpy array.