parsed image into pixels - still some bugs