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

  • Home
  • SEARCH
  • 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 8312271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:06:33+00:00 2026-06-08T20:06:33+00:00

how can I create an image and how can I colored it pixel by

  • 0

how can I create an image and how can I colored it pixel by pixel using hexadecimal code of colors?

For ex. I wanna create a 100×100 pixel image and I wanto to 1×1 area’s color is ‘$002125’,2×2 area’s color is ‘$125487’…. How can I do it?

Thank you for your answers..

  • 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-08T20:06:34+00:00Added an answer on June 8, 2026 at 8:06 pm

    Made a simple sample for you. Using Canvas.Pixels not Scanline. Scanline is faster though but for start I think it suits just fine. The colors are randomly generated, so you just need to replace this part of the code.

        procedure TForm1.GenerateImageWithRandomColors;
        var
          Bitmap: TBitmap;
          I, J: Integer;
          ColorHEX: string;
    
        begin
          Bitmap := TBitmap.Create;
          Randomize;
    
          try
            Bitmap.PixelFormat := pf24bit;
            Bitmap.Width := 100;
            Bitmap.Height := 100;
    
            for I := 0 to Pred(Bitmap.Width) do
            begin
              for J := 0 to Pred(Bitmap.Height) do
              begin
                Bitmap.Canvas.Pixels[I, J] := RGB(Random(256),
                   Random(256),
                   Random(256));
    
                // get the HEX value of color and do something with it
                ColorHEX := ColorToHex(Bitmap.Canvas.Pixels[I, J]);
              end;
            end;
    
            Bitmap.SaveToFile('test.bmp');
          finally
            Bitmap.Free;
          end;
        end;
    
    function TForm1.ColorToHex(Color : TColor): string;
    begin
      Result :=
         IntToHex(GetRValue(Color), 2) +
         IntToHex(GetGValue(Color), 2) +
         IntToHex(GetBValue(Color), 2);
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone suggest a way to create a small solid colored bitmap image from
How can I use this function here: Create an image and colored ir? for
How can I create a barcode image in Java? I need something that will
I want to know if PHPExcel can: Create Excel spreadsheets with embeded image. The
Does anyone know how I can create a Completely transparent image or given am
I need to position a div over an image with jQuery. I can create
Can I create button, use a background image that changes on hover and on
I am working currently on a web project where users can create image galleries
I want to try to create an image using NSdata. If imageWithData: method of
I can create a image folder when I create a category, so that I

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.