Updated image data loader to accept ImageData directly, pixelCount typo