bpy.types.Image.pixels Description

From the https://docs.blender.org/api/blender_python_api_2_76_9/bpy.types.Image.html I saw that from Image.pixels you get Image pixels in floating point values but I do not quite understand what returns. Can somebody give me an alternative using PIL or another Library that provide the same functionality of Image.pixels? I want this for a debugging of a script that I want to integrate in blender.

To be more explicit:

I have a script that manipulate pixels and I want to use it in blender. The input for script is a numpy array obtain from PIL image and the output is a PIL image obtain from numpy array. The problem is that the blender Image.pixels return a 1D array and from PIL I get 4D array. How to convert from PIL to Blender image and from Blender to PIL image and taking into account the order of the pixels and data type?