DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 23 Aug 2007 03:53:18 -0700,    posted on: microsoft.public.dotnet.framework.drawing        back       

Thread Index
  1    pamela fluente


Compressing PNG with given quality   
Hello I am saving JPG file with the following SUB.

    Sub SaveJPG(ByVal Image As Image, ByVal FileName As String, _
                         ByVal QualityLevel_0_100 As Byte, _
                         ByVal ColorDepthLevel As Byte)

        Dim ImageCodecInfoJPG As ImageCodecInfo =
GetEncoderInfo("image/jpeg")

        Dim EP As New EncoderParameters(2)
        EP.Param(0) = New EncoderParameter(Encoder.Quality,
QualityLevel_0_100)
        EP.Param(1) = New EncoderParameter(Encoder.ColorDepth,
ColorDepthLevel)
        Image.Save(FileName, ImageCodecInfoJPG, EP)

    End Sub

1. How can I do the same with PNG (I need to specify the compression
level if possible because
I always get PNG too big)

2. Given a Bitmap, what the best way to set ColorDepthLevel ? What's
the procedure to determine the best value for a given bitmap?


-P
Date:Thu, 23 Aug 2007 03:53:18 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us