I want to convert a .gif file into a 4D array/a 3D array of RGB values.
I've tried PIL, but that seems to only let me read the gif as a gray-scale image.
ndimage from numpy doesn't have that problem, but it only results in the first frame of the gif.
The .gif I'm trying to convert, for testing purposes, is
Which just increases in red across the top of the first frame, increases in green down the side of the fisrt frame, and increases in blue at the top left as the frames advace.
PIL gives me
[[[ 0 3 5 6 8]
[ 7 12 12 12 12]
[ 9 12 12 12 12]
[10 12 12 12 12]
[11 12 12 12 12]]
[[ 1 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]]
[[ 2 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]]
[[ 4 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]
[12 12 12 12 12]]]
Whereas numpy gives me
[[[ 0 0 0]
[ 20 0 0]
[ 40 0 0]
[ 60 0 0]
[ 80 0 0]]
[[ 0 20 0]
[255 255 255]
[255 255 255]
[255 255 255]
[255 255 255]]
[[ 0 40 0]
[255 255 255]
[255 255 255]
[255 255 255]
[255 255 255]]
[[ 0 60 0]
[255 255 255]
[255 255 255]
[255 255 255]
[255 255 255]]
[[ 0 80 0]
[255 255 255]
[255 255 255]
[255 255 255]
[255 255 255]]]
Neither of which is what I want.
