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 9033857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:20:10+00:00 2026-06-16T08:20:10+00:00

I want to create multiple 200×200 images with a number centered on them and

  • 0

I want to create multiple 200×200 images with a number centered on them and save them with the corresponding file name automatically to a folder. Just that, nothing more.

I figured it’d be best to try this with an imagebox and writing on it with a loop, but I’m getting nowhere. Any ideas?

  • 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-06-16T08:20:11+00:00Added an answer on June 16, 2026 at 8:20 am

    You are on the right track, bud. However; to accomplish what you want, you’ll need to call the ‘Graphics’ class, available in the System.Drawing namespace.

    The task you want done is quite easy.

    First loop through the images you wanna create

    Lets say you want 5 images

    … call the for loop!

    for (int I = 0; I < 5; I++) { }
    

    Inside the loop we want to create a 200×200 image which is available to edit.
    I prefer the ‘Bitmap’ class to accomplish this.

    After creating the Bitmap, I’ll create Graphics for it.
    Then I will draw the string in approx. the center. If you want the 100% center, you can use the MeasureString function

    Final code:

    for (int I = 0; I < 5; I++) {
        Bitmap B = new Bitmap(200, 200);
        Graphics G = Graphics.FromImage(B);
        G.DrawString(I.ToString(), this.Font, Brushes.Black, new PointF(100.0f, 100.0f);
        B.Save(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolders.Desktop), I + ".png"))) // Save on the desktop
    }
    

    I haven’t tried this code yet, but I assume it works. Few modifications may be needed 🙂

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

Sidebar

Related Questions

I have an XML file (on the left) and I want to create multiple
hey i want to be able to create multiple shapes and store them perhaps
I want to create a single video file from multiple video files (parts). I
I want my code to automatically try multiple ways to create a database connection.
I want to create multiple FileStreams and need to keep them open - there
I want to create multiple instances of a class without saving them to a
i want create multiple search where statement $where_search is a multiple condition from post
I want to create multiple versions of print-friendly pages from a single page. I
I`v come across a need where I want to create multiple list items from
I want to create an array that has multiple index and in each index

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.