# Picture

Pictures can be added to documents and various settings like fill, line format, style can be set on them.

## Content

DsWord allows you to add pictures in documents and apply various settings on them. A picture can be added by using [Add](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.PictureCollection.Add.html) and [Insert](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.PictureCollection.Insert.html) methods of [PictureCollection](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.PictureCollection.html) class. You can also access the previous or next pictures, apply fill format, line format, shape style, set alternative text, title etc. by using methods provided by [Picture](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.Picture.html) class.
To add picture in a document:

1. Create a new Word document by instantiating **GcWordDocument** class.
2. Add a run to a newly added paragraph by using **Add** method of RunCollection class.
3. Add a picture by using **Add** method of **PictureCollection** class.
4. Set the position, width and outline color of picture by using various properties.

    ```csharp
    var doc = new GcWordDocument();
    
    //Create run element       
    var run = doc.Body.Paragraphs.Add().GetRange().Runs.Add();
    
    //Add a picture
    var pic = run.GetRange().Pictures.Add();
    pic.ImageData.SetImage(new Uri("Resources/picture.png"), "image/png");
    
    //Shift picture position 100 points lower
    pic.Position.Vertical.RelativeTo = ShapeVerticalRelativePosition.Page;
    pic.Position.Vertical.Offset = 100;
    
    //Set outline width
    pic.Line.Width = 2;
    //Increase "effective size" of shape by same value as outline width
    pic.Size.EffectExtent.AllEdges = 2;
    //set outline color
    pic.Line.Fill.Type = FillType.Solid;
    pic.Line.Fill.SolidFill.RGB = System.Drawing.Color.Red;
    
    doc.Save("Picture.docx");
    ```

**Limitations**
Effects and derived classes (EffectsDAG, EffectsList) are not supported\*\*.\*\*