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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:35:33+00:00 2026-05-17T14:35:33+00:00

I have a screen shot I take in my mobile app. The screen shot

  • 0

I have a screen shot I take in my mobile app. The screen shot takes about 32 KB when saved as a png on a disk.

I am sending these to a central SQL Server and 32 KB is too big for that amount of times I will need to store that screen shot (approx 2500 times a day).

Is there any kind of trickery that I can do to get it to save smaller?

Here is the code I am using now to take it from Bitmap to bytes (to send to the server for storage):

MemoryStream stream = new MemoryStream();
 _signatureImage.Save(stream, ImageFormat.Png);
 return stream.ToArray();

_signatureImage is a Bitmap and is the screenshot in question.

Here is an example of the screen shot I am saving:

Screen Shot Image

Things that pop to mind (but I don’t know how to do them):

  1. Reduce the actual Height and Width of the image (but hopefully in a way that will not distort it).
  2. Change it to a black and white image (not sure if I will see any real space savings from this)
  3. Compress it more (I don’t like this as much because then it is not readable from the database).

Note, this all has to be done programatically, and cannot take very long, so complex image manipulations are out.

Thanks for any help.

  • 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-17T14:35:33+00:00Added an answer on May 17, 2026 at 2:35 pm
        private static Image ResizeImage(int newSize, Image originalImage)
        {
            if (originalImage.Width <= newSize)
                newSize = originalImage.Width;
    
            var newHeight = originalImage.Height * newSize / originalImage.Width;
    
            if (newHeight > newSize)
            {
                // Resize with height instead
                newSize = originalImage.Width * newSize / originalImage.Height;
                newHeight = newSize;
            }
    
            return originalImage.GetThumbnailImage(newSize, newHeight, null, IntPtr.Zero);
        }
    

    This should work with your Bitmap object Type and resize the Height or Width, depending on which is appropriate for your image dimensions. It will also maintain scale.

    EDIT:

    You could create a new Bitmap object and resize your original image into that Bitmap object.

    Bitmap b = new Bitmap(newWidth, newHeight);
    Graphics g = Graphics.FromImage((Image)b);
    g.InterpolationMode = InterpolationMode.HighQualityBicubic;
    
    g.DrawImage(imgToResize, 0, 0, newWidth, newHeight);
    g.Dispose();
    
    return (Image)b;
    

    I don’t have the Compact Framework installed, but it seems that this should work for you.

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

Sidebar

Related Questions

i want to have a screen shot with in the app and then use
I am developing a java application. I have scenario to take screen shot of
I have a loading screen for my app (default.png). When user suspends my app,
I am creating a app to take a screen shot of a scrolling window
here is the screen shot of my database! i have successfully done the insert
I have a part of my app that takes a screenshot of a certain
I want to take a screen shot in android irrespective of the application and
I need to take a screen shot and convert that screen shot to a
I have the following code to take a screenshot of a window, and get
I have the following code to take screenshots of a window: HDC WinDC; HDC

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.