Initialize pixmap and add getPixmap method.