Saving a bitmap as a PNG without the gamma info

  • Thread starter Thread starter Patrick Ruzand
  • Start date Start date
P

Patrick Ruzand

Hello,

[Apologize for the cross-post in microsoft.public.dotnet.framework.drawing,
but I just noticed the .drawing group is not in the managed newsgroups list]

I have written a custom web control that dynamically generates bitmaps
in the response stream, using the Image.Save(stream, format) method.
When generating a PNG image, I am facing the well-known issue of the
bad PNG gamma correction support in the browsers.

So, I was wondering if there was a way to specify to the ImageCodecInfo
used to save a bitmap to NOT save the png gamma chunck (for example
by means of an EncoderParameter ?) ?

Thanks a lot,
 
Hi Patrick,

I will perform some research on this issue and get back to you ASAP. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Patrick,

Sorry for letting you wait.

You can see which encoder parameters are supported by each codec using the
technique described here:
"Determining the Parameters Supported by an Encoder"
http://msdn2.microsoft.com/en-us/library/ms533840.aspx

Note that the use of System.Drawing from ASP.NET, or any other service
context, is not supported:
http://msdn2.microsoft.com/en-us/library/system.drawing.aspx

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Patrick ,

Have you reviewed my reply to you? Does it make sense to you? If you still
need any help, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi,
Hi Patrick ,

Have you reviewed my reply to you? Does it make sense to you? If you still
need any help, please feel free to feedback, thanks.

In fact I still have to perform more tests and investigations
on my side before going further. Be sure I'll let you know in
case I still need help ;-)

Thanks for your help,

Patrick
 
Back
Top