title: C# Graphics, dealing with large bitmaps take too much time
body: <p>I am working on a kind of 2D game engine. The engine itself is a separate thread running in a loop and calling a renderer function. This functions renders the current game situation from scratch each loop. It all works fine with small objects. I can move a character, add/remove obkect dynamically, detect collisions, and much more.</p>
  <p>The problem is that I now added a 8000 x 8000 pixel background and the whole thing collapses. That is a large image but not extreme. right?</p>
  <p>The &quot;g.DrawImage(BGImage,new Point(0,0));&quot; function just takes a lot of time and totally wrecks my renderer thread. the same code with a much smaller bg image runs fine. So g.DrawImage seems to be not able to handle large images.</p>
  <p>The image drawn is already in an Image object. Loaded only once via
  BGImage = new Bitmap(Image.FromFile(BGImagePathAndFile));</p>
  <p>The reason for using one large image file is that I use g.rotate/Scale/TranslateTransform functions to zoom in/out and pan around on the game field. My objects are pinned to pixel coordinates on that (large) background image.</p>
  <p>What would be a good approach to handle this?</p>
  <p>Is there a way to only g.DrawImage() my background once and use that as a starting point for each consecutive render?</p>
  <p>Any other advice?</p>