• Lunes 29 de Abril de 2024, 06:34

Autor Tema:  Bajar la calidad de un PNG  (Leído 763 veces)

cyttorak

  • Nuevo Miembro
  • *
  • Mensajes: 2
    • Ver Perfil
Bajar la calidad de un PNG
« en: Martes 15 de Diciembre de 2009, 01:56 »
0
Hola
Estoy capturando la pantalla del escritorio y salvandola en un PNG con el siguiente codigo:

using (MemoryStream ms = new MemoryStream())
{
  Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
  Graphics gfx = Graphics.FromImage(bmp);
  gfx.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
  bmp.Save(ms, ImageFormat.Png);
  ...
}

¿Mi pregunta es si hay alguna manrea de al salvarlo indicarle el numero de colores que tiene que usar la paleta? o algo similar para disminuir el tamaño del archivo?