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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:26:39+00:00 2026-06-13T13:26:39+00:00

This is the code: if (Form1.ExtractAutomatic == true) { using (var bitmap = new

  • 0

This is the code:

if (Form1.ExtractAutomatic == true)
            {
                using (var bitmap = new Bitmap(_width, _height, _width * 3, PixelFormat.Format24bppRgb, pBuffer))
                {
                    if (!this.Secondpass)
                    {
                        long[] HistogramValues = Form1.GetHistogram(bitmap);
                        Form1.Histograms.Add(HistogramValues);
                        long t = Form1.GetTopLumAmount(HistogramValues, 1000);
                        Form1.averagesTest.Add(t);

                    }
                    else
                    {

                        if (_frameId > 0)
                        {
                            double t = Form1.averagesTest[_frameId] / 1000.0 - Form1.averagesTest[_frameId - 1] / 1000.0;
                            w.WriteLine("averagesTest >>>  " + t);
                            double tt = framesCounts();
                            if (_frameId == framesCounts())
                            {
                                w.Close();
                            }
                            if (Form1.averagesTest[_frameId] / 1000.0 - Form1.averagesTest[_frameId - 1] / 1000.0 > 0.0) 
                            {
                                count = 6;
                            }

                            if (count > 0)
                            {
                                ResizeBitmap(bitmap, 10, 10);
                                bitmap.RotateFlip(RotateFlipType.Rotate180FlipX);
                                bitmap.Save(Path.Combine(_outFolder, _frameId.ToString("D6") + ".bmp"),ImageFormat.Bmp);
                                count --;
                            }

And ResizeBitmap is:

public static Bitmap ResizeBitmap(Bitmap b, int nWidth, int nHeight)
        {
            Bitmap result = new Bitmap(nWidth, nHeight);
            using (Graphics g = Graphics.FromImage((Image)result))
                g.DrawImage(b, 0, 0, nWidth, nHeight);
            return result;
        }

Why the files on the hard disk are 1920X1080 and not 10X10 ?
And why the saving is so slow ? I thought saving files to the hard disk in this case about 2600 frames should be fast no ?

Can someone show me how ot fix it according to my code ?

Thanks.

  • 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-13T13:26:41+00:00Added an answer on June 13, 2026 at 1:26 pm

    It should be

    bitmap = ResizeBitmap(bitmap, 10, 10);
    

    You aren’t assigning the resized bitmap to anything.

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

Sidebar

Related Questions

I have this code: int ISampleGrabberCB.BufferCB(double sampleTime, IntPtr pBuffer, int bufferLen) { if (Form1.ExtractAutomatic
if you run this snippet of code(put it in form1) in a fresh new
If I have this code: Label label1 = new Label(); Form1.Controls.Add(label1); Label label2 =
i am using this code under my form1_load notifyIcon1.Visible = true; notifyIcon1.ShowBalloonTip(5000, Welcome, Hello
I'm trying to append text lines with this code SendMessage(Form1.log.Handle, WM_SETTEXT, 0, Integer(PChar(textLog))); //
With this code: public partial class Form1 : Form { private static readonly int
I am using this code: private void Form1_Load(object sender, EventArgs e) { } private
I have this code: public partial class Form1 : Form { public Form1() {
To read i tried this code: In the top of Form1 i did: Dictionary<string,
please help me to make this code parallel using openmp this code is run

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.