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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:58:32+00:00 2026-05-13T21:58:32+00:00

I have a VS 2008, .NET 3.5 targeted MVC.NET app. I am developing on

  • 0

I have a VS 2008, .NET 3.5 targeted MVC.NET app. I am developing on Windows 7 with its IIS, but deploying to a Windows Server 2003 environment with .NET 3.5 SP1 installed.

We have a image scaling action that returns an image from the database in the requested resolution, and converts to PNG on the fly with System.Drawing and System.Drawing.Imaging APIs.

The image served up via the deployed site is 1/2 the size/quality of the one in development. The source image is identical, but requesting via the deployed site results in a 6.35 kb PNG of 154×200, but on development it results in a 12.28 kb PNG of 154×200.

My suspicion is there is some difference in the .NET graphics lib on 3.5 SP1 on Windows server? My app explicitly targets the .NET 3.5 runtime.

      Image image = Image.FromStream(new MemoryStream(document.content));
      MemoryStream memStream = new MemoryStream();
      Bitmap bmp = new Bitmap(image, (int)width, (int)height);
      ImageFormat format = ImageFormat.Png;
      string mimeType = document.mimeType;
      if(document.mimeType == "image/png")
          ; // format = ImageFormat.Png;
      else if (document.mimeType == "image/jpeg")
         format = ImageFormat.Jpeg;
      else if (document.mimeType == "image/gif")
         format = ImageFormat.Gif;
      else if (document.mimeType == "image/tiff")
      {
         format = ImageFormat.Png; // convert tiff to png
         mimeType = "image/png";
      }

      bmp.Save(memStream, format);

HTTP headers are:
Development:
Cache-Control private
Content-Type image/png
Server Microsoft-IIS/7.5
X-AspNetMvc-Version 2.0
X-AspNet-Version 2.0.50727
X-Powered-By ASP.NET
Date Fri, 05 Mar 2010 19:59:50 GMT
Content-Length 12574

Production:
Date Fri, 05 Mar 2010 20:02:58 GMT
Server Microsoft-IIS/6.0
X-Powered-By ASP.NET
X-AspNet-Version 2.0.50727
X-AspNetMvc-Version 2.0
Cache-Control private
Content-Type image/png
Content-Length 6514

  • 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-13T21:58:32+00:00Added an answer on May 13, 2026 at 9:58 pm

    Maybe you need to set the pixel format or other options that you’re just using the default value for: http://www.codeproject.com/KB/GDI-plus/imageresize.aspx

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

Sidebar

Related Questions

I have a Windows 2008 Server with IIS 7 which using a .NET C#
I have a simple Windows App written in Visual Studio 2008 (.NET 3.0, C#).
I have win 2008 R2 server with .net mvc project and other Ubuntu Linux
VB.NET 2008 windows app form. I have a groupbox with several checkboxes, comboboxes, and
I have a simple windows Service developed in VS.net 2008 and VB.net. When I
We have an ASP.Net MVC 1.0 solution developed using Visual Studio 2008 and .net
I have a very simple windows Service that is developed in vb.net 2008. When
Ok, I'm using SQL Server Express 2008 and .Net 3.5 (c#) I have a
I have many Visual Studio 2008 web projects targeted at the .NET Framework 3.5.
i have been building websites using vs 2008 (mostly asp.net mvc, jquery and webforms).

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.