SPPictureLibrary Class

Represents a document library that contains pictures.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public class SPPictureLibrary : SPDocumentLibrary

To obtain an SPPictureLibrary object, cast the given list as a picture library, as shown in the following example.

SPPictureLibrary oPictureLibrary = (SPPictureLibrary)list;
Caution noteCaution

Changing the values of any of the properties of SPPictureLibrary may lead to adverse effects in the user interface and is not supported.

The following code example displays property settings for the size of images used in a picture library on the specified site.

using(SPWeb oWebsite = SPContext.Current.Site.AllWebs["Website_Name"])
SPPictureLibrary oPictureLibrary = 

Response.Write(oPictureLibrary.ThumbnailSize.ToString() + " :: " +
    oPictureLibrary.WebImageHeight.ToString() + " :: " +

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.