[SOLVED] 2D Images Pixel to Pixel

So I have a picture showing on top of my game, but when I change the size of the window it changes the picture, making it look bad when the pixels don’t line up properly. How do I change this so that one pixel in the image comes out as one pixel in game? Right now I’m using OnscreenImage.

Reparent that image to pixel2d.

Thans, I tried that, but my image disapeared.

self.image = OnscreenImage(image = 'Image.png', parent=pixel2d)

EDIT:
Fixed it in two different ways:

self.image = OnscreenImage(image = 'Image.png', scale=min((float(self.imgResX)/self.resX), (float(self.imgResY)/self.resY)))

or

self.image = OnscreenImage(image = 'Image.png', parent=pixel2d, scale=(self.imgResX/2.0, 1, self.imgResY/2.0), pos=(self.resX/2.0, 0, -self.resY/2.0))

Obviously you need to define imgResX, imgResY, resX, and resY.