Should be no task for a modern computer at all, they are fast enough to do this. But some tiny improvements:
DEC height
DEC width
FOR y% = 0 TO height
FOR x% = 0 TO width
abgr% = pixels%[x + (y*width)]
NEXT
NEXT
And also make sure, that width and height are integers. And if you dont need to do this every loop, dont do it! Just do it as often as you need, it, if you need it just one time, do it before the main loop.