func ImageToPixelArray(cFileName)
pixmap= new qpixMap(cFileName)
image = pixmap.toImage()
height = image.height()
width = image.width()
Rlist = list(width ,height)
Glist = list(width ,height)
Blist = list(width ,height)
Alist = list(width ,height)
RGBAlist = []
? "pixelRGBAlist : "
for i = 1 to width
for j=1 to height
color = image.pixel(i, j)
oColor = new QColor()
oColor.setRGBA(color)
Rlist[i][j] = oColor.red()
Glist[i][j] = oColor.green()
Blist[i][j] = oColor.blue()
Alist[i][j] = oColor.alpha()
/*?"{ R :" + oColor.red() + ", " +
"G :" + oColor.green() + ", " +
"B :" + oColor.blue() + ", " +
"A :" + oColor.alpha() + "} " */
next
next
RGBAlist + Rlist
RGBAlist + Glist
RGBAlist + Blist
RGBAlist + Alist
? :DONE
return [
:Height = height,
:Width = width,
:RGBA = RGBAlist
/*:Red = Rlist,
:Green = Glist,
:Blue = Blist ,
:Alpha = Alist*/
]