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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:36:36+00:00 2026-05-13T13:36:36+00:00

Is there a way to re-size a transparent image in windows mobile(C#)? I can

  • 0

Is there a way to re-size a transparent image in windows mobile(C#)? I can re-size the image but I am losing the transparency. It is being replaced with white.

Here is what I have now

public static void ResizePicture(string imageFileName, Size maxSize)
{
    using (Image src = new Bitmap(imageFileName))
    {
        using (Bitmap dst = new Bitmap(maxSize.Width, maxSize.Height))
        {
            using (Graphics g = Graphics.FromImage(dst))
            {

                ImageAttributes imageAttr = new ImageAttributes();
                g.Clear(Color.Transparent);
                g.DrawImage(src, new Rectangle(0, 0, dst.Width, dst.Height), 0, 0, src.Width, src.Height, GraphicsUnit.Pixel, imageAttr);
            }
            dst.Save(imageFileName, ImageFormat.Png);
        }                
    }
}
  • 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-13T13:36:37+00:00Added an answer on May 13, 2026 at 1:36 pm

    Have a look at this as found in the MSDN about setting the transparency color. It looks like you need to set the SetColorKey for this to work. See also here that explains you cannot set the transparency (apparently contradicting the first link). But, you can still down the Smart Devices Framework (community edition) found in OpenNetCF.org and use that instead to handle the transparency workaround. I would try the first link before going any further to see if that works.

    Hope this helps,
    Best regards,
    Tom.

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

Sidebar

Related Questions

Is there some way to validate the image size (height and width) before upload
Is there a way to get the client screen size in a web application?
Is there any way to find what is a size of a code and
Is there a way to programatically track the size of a particular session on
Is there any way I get get the size of an NSWindow (in pixels)
is there a way to change the font size gradually in a UILabel? I
Is there a way to get the size of a remote file http://my_url/my_file.txt without
Is there a way of checking the size of a file which has been
Is there a way to find out size of a std::bitset ? I have
Is there a way to change the size of swf, (in the example the

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.