protected virtual void UpdateData() { Llista <Byte> data = new Llista <byte>(); data.AddRange(Serializar.GetBytes(Keyword)); //Keyword data.Add(NULLBYTE); //null separator data.AddRange(System.Text.ASCIIEncoding.Convert(Encoding.ASCII, System.Text.Encoding.GetEncoding(1252), Serializar.GetBytes(Information))); //text ChunkData = data.ToTaula(); }
void Update() { Llista <byte> dataBytes = new Llista <byte>(); dataBytes.AddRange(Serializar.GetBytes(SequenceNumber)); dataBytes.AddRange(Serializar.GetBytes(Width)); dataBytes.AddRange(Serializar.GetBytes(Height)); dataBytes.AddRange(Serializar.GetBytes(OffsetX)); dataBytes.AddRange(Serializar.GetBytes(OffsetY)); dataBytes.AddRange(Serializar.GetBytes(DelayNum)); dataBytes.AddRange(Serializar.GetBytes(DelayDen)); dataBytes.Add((byte)DisposeOP); dataBytes.Add((byte)BlendOP); ChunkData = dataBytes.ToTaula(); }
void UpDateData() { DateTime fecha = this.fecha.ToUniversalTime(); byte[] bytesAño = Serializar.GetBytes((short)fecha.Year); ChunkData = new byte[] { bytesAño[1], bytesAño[0], (byte)fecha.Month, (byte)fecha.Day, (byte)fecha.Hour, (byte)fecha.Minute, (byte)fecha.Second }; }
public Point GetPoint(int colorInt) { const int ARGB = 4; int posicion; byte[] bytesColor; Point location = default(Point); bool encontrado = false; if (pointLocatedByColorList.ContainsKey(colorInt)) { location = pointLocatedByColorList[colorInt].Value; } else { bytesColor = Serializar.GetBytes(colorInt); for (int y = 0, yFin = Convert.ToInt32(imagen.Height), xFin = Convert.ToInt32(imagen.Width) * ARGB; y < yFin && !encontrado; y++) { for (int x = 0; x < xFin && !encontrado; x += ARGB) { posicion = x + (y * xFin); encontrado = bytesImg[posicion] == bytesColor[0] && bytesImg[posicion + 1] == bytesColor[1] && bytesImg[posicion + 2] == bytesColor[2] && bytesImg[posicion + 3] == bytesColor[3]; if (encontrado) { location = new Point(x, y); } } } if (!encontrado) { throw new ArgumentOutOfRangeException("El color no esta dentro de la imagen!"); } else { pointLocatedByColorList.Add(colorInt, location); if (!colorLocatedByPointerList.ContainsKey(new PointZ(location, 0))) { colorLocatedByPointerList.Add(new PointZ(location, 0), System.Drawing.Color.FromArgb(colorInt)); } } } return(location); }
void UpDate() { Llista <byte> dataBytes = new Llista <byte>(); uint[] fields = { width, height, bitDepth, colorType, compressionMethod, filterMethod, interlaceMethod }; for (int i = 0; i < fields.Length; i++) { dataBytes.AddRange(Serializar.GetBytes(fields[i])); } ChunkData = dataBytes.ToTaula(); }
void UpdateData() { ChunkData = Serializar.GetBytes(NumeroDeFotogramas).AfegirValors(Serializar.GetBytes(NumeroDeRepeticiones)).ToTaula(); }