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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:11:17+00:00 2026-05-30T20:11:17+00:00

My app make screenshot using methods from WinAPI. Screen is ok, it is saved

  • 0

My app make screenshot using methods from WinAPI. Screen is ok, it is saved as gif and has 76 kB. Jpg, png and other formats have more size. I have to send this file via net and it takes several seconds, about 2-3 seconds. It is posibility to compress this file in .NET or any free external software ? Quality don’t have good, because I have to read only several labels.

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-05-30T20:11:18+00:00Added an answer on May 30, 2026 at 8:11 pm

    You could look at resizing the image in c#. It’s fairly easy to do… here’s some code I’ve used in the past to do this:

    Image image = Image.FromFile(fi.FullName);
    image = resizeImage(image, new Size(120, 120));
    EncoderParameter qualityParam = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, (long)85);
    ImageCodecInfo jpegCodec = GetEncoderInfo("image/jpeg");
    EncoderParameters encoderParams = new EncoderParameters(1);
    encoderParams.Param[0] = qualityParam;
    image.Save(OutSourceLoc + "/" + fi.Name, jpegCodec, encoderParams);
    
    
    static Image resizeImage(Image imgToResize, Size size)
        {
            int sourceWidth = imgToResize.Width;
            int sourceHeight = imgToResize.Height;
    
            float nPercent = 0;
            float nPercentW = 0;
            float nPercentH = 0;
    
            nPercentW = ((float)size.Width / (float)sourceWidth);
            nPercentH = ((float)size.Height / (float)sourceHeight);
    
            if (nPercentH < nPercentW)
                nPercent = nPercentH;
            else
                nPercent = nPercentW;
    
            int destWidth = (int)(sourceWidth * nPercent);
            int destHeight = (int)(sourceHeight * nPercent);
    
            Bitmap b = new Bitmap(destWidth, destHeight, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            b.SetResolution(300, 300);
            Graphics g = Graphics.FromImage((Image)b);
            g.InterpolationMode = InterpolationMode.HighQualityBicubic;
            g.CompositingQuality = CompositingQuality.HighSpeed;
            g.SmoothingMode = SmoothingMode.HighSpeed;
    
            g.DrawImage(imgToResize, 0, 0, destWidth, destHeight);
            g.Dispose();
    
            return (Image)b;
    
        }
    
        private static ImageCodecInfo GetEncoderInfo(string mimeType)
        {
            // Get image codecs for all image formats 
            ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
    
            // Find the correct image codec 
            for (int i = 0; i < codecs.Length; i++)
                if (codecs[i].MimeType == mimeType)
                    return codecs[i];
            return null;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can i capture the screenshot of an app using ddms from intellij Idea?
I'm hacking on a simple Cocoa app to make blocks move around the screen
Possible Duplicate: Make iPhone app paid version replace free version on install from app
in my iPad app, I'd like to make a screenshot of a UIView taking
Can I make my app take a screenshot of the contents of a view
I'm using the ASIHTTPRequest lib in my iOS app to make RESTful requests to
I am using the below code in my app to make a beep sound.
I have this xml <App> <Id id=129/> <Path id=category/self/> <Screenshots> <Screenshot url=small_480x320_34eaefb6c934a0d82da637bec2276bdd_ebecfca09179d055ed4d3cf15a41bf7c-8f95512356608b888f288b374db7b37fabb3ce27.jpg/> <Screenshot url=small_480x320_438a9e1352bda4ef9724ae422473a556_615625ab835b09aa712e9c84c056cd7a-15bc8803724197129aea59577cac334736fadd3f.jpg/>
I am trying to make a contact app style image + labels (screenshot). I
When the users of this app make changes to the fields a large amount

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.