Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6847235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:43:14+00:00 2026-05-27T00:43:14+00:00

I recently diverged from business application programming to trying my hand (just as a

  • 0

I recently diverged from business application programming to trying my hand (just as a hobby) at creating a card game implementation in .NET (C#). Naturally, there are some differences that I have encountered, one of which is the graphical nature of game applications.

Instinctively, I was saving all images used as the backgrounds for forms and controls as jpegs before setting them as properties in the project. Then I began to wonder if they were being embedded as bitmaps anyway, and if perhaps I was better off leaving them as .bmp files. I tried to find an answer to this question before posting here, but didn’t have any joy.

Is there a significant benefit to using jpg files over bmp when setting the BackgroundImage property at design time? For images loaded at runtime, images shipped with the application that for whatever reason exist as individual files (perhaps in a resource folder), I can see the benefit, but I’m not sure about the former.

Any insight would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:43:15+00:00Added an answer on May 27, 2026 at 12:43 am

    The important thing is using a pre-computed bitmap for the image when setting the background, to improve the performance.

    private Bitmap renderBmp;
    public override Image BackgroundImage
    {
         set
         {
              Image baseImage = value;
              renderBmp = new Bitmap(Width, Height,
                  System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
              Graphics g = Graphics.FromImage(renderBmp);
              g.DrawImage(baseImage, 0, 0, Width, Height);
              g.Dispose();
         }
         get
         {
              return renderBmp;
         }
    } 
    

    The code sample has been extracted from this post, that explains other techniques to improve the performance painting background images.

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my
Recently, I've been dealing with an error with accessing MAPI via the .NET framework
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
Recently just upgraded to SQL Server 2008 R2 Express. When I attempt to create
Recently two users of our software from the same company started experiencing random closures
Recently, I'm trying to solve all the exercises in CLRS. but there are some
Recently I needed to add drag & drop functionality to a Silverlight application. Can
Recently, I added a setup project to my application. In the setup project, I
Recently I started reading (just a bit) the current draft for the future C++11
Recently, I switched my development environment from Windows to Linux. So far, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.