Added fromPixel method