Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Direct2D to render a PNG image using a ID2D1BitmapRenderTarget and then caling it's GetBitmap() function and rendering the image using ID2D1HwndRenderTarget::DrawBitmap().

Some of the images rendered this way are clear but others appear blurry. I did some research and followed a tutorial to make my application "DPI Aware" but it didn't help.

enter image description here

(sample with a blurry image on the left)

What could cause the rendered image to appear blurry? Has anyone experienced this issue before? What can I do about this?

share|improve this question
How about a screenshot? – ashes999 Dec 2 '12 at 22:38
Here is the same PNG file, rendered blurry on the left and clear on the right: – Jason Dec 2 '12 at 23:03
My eyes are not that great, but it doesn't look blurry to me. – ashes999 Dec 3 '12 at 1:07
@Jason Your image to imageshack is no longer valid. You probably want to reupload it to stack.imgur instead. (Image shack has started to remove old images and replace them by ads; see for more details). – Alexandre Vaillancourt Sep 1 '15 at 18:47
up vote 3 down vote accepted

I’m not exactly knowledgeable in Direct2D, but you're probably drawing your image on a half-pixel boundary, and you're getting pwned by antialiasing.

Try drawing the first image half a pixel to the bottom right, so instead of doing

Draw(something, x, y);

do something like

Draw(something, x + 0.5, y + 0.5);

Google "Direct2D half pixel" for information on how to do this.

share|improve this answer
That did it thanks :x – Jason Dec 3 '12 at 4:30
Glad I could help. – Panda Pajama Dec 3 '12 at 4:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.