public PdfXObjectStream(Image image, PdfName name) : base() { this.image = image; this.name = name; this.width = new PdfName("Width"); this.height = new PdfName("Height"); this.filter = new PdfName("Filter"); image.Save(base.s.BaseStream, image.RawFormat); s.Write("\n"); // Add the elements for an image XObject to the stream dictionary this.streamDictionary.Add(type, new PdfName("XObject")); this.streamDictionary.Add(subType, new PdfName("Image")); this.streamDictionary.Add(new PdfName("Name"), name); this.streamDictionary.Add(width, new PdfInt(image.Width)); this.streamDictionary.Add(height, new PdfInt(image.Height)); this.streamDictionary.Add(new PdfName("BitsPerComponent"), new PdfInt(8)); //TODO: Remove test this.streamDictionary.Add(filter, new PdfName("DCTDecode")); this.streamDictionary.Add(new PdfName("ColorSpace"), new PdfName("DeviceCMYK")); }
public void Remove(PdfName key) { ((IDictionary)this).Remove(key); }
public void Add(PdfName key, PdfObject value) { ((IDictionary)this).Add(key, value); }
public bool Contains(PdfName key) { return ((IDictionary)this).Contains(key); }
public PdfObject this[PdfName key] { get { return (PdfObject)((IDictionary)this)[key]; } set { ((IDictionary)this)[key] = value; } }