C# Class Subtext.Framework.Images

ファイルを表示 Open project: ayende/Subtext

Public Methods

Method Description
DeleteImage ( Image image ) : void
EnsureDirectory ( string directoryPath ) : void
GalleryVirtualUrl ( int categoryid ) : string

Returns the url path to the gallery for the specified category.

GetFileStream ( HttpPostedFile objFile ) : byte[]

gets the bytes for the posted file

GetImagesByCategoryID ( int catID, bool activeOnly ) : ImageCollection
GetSingleImage ( int imageId, bool activeOnly ) : Image
InsertImage ( Image image, byte Buffer ) : int

Inserts the image.

LocalGalleryFilePath ( int categoryid ) : string

Returns the physical gallery path for the specified category.

MakeAlbumImages ( Image image ) : void

Saves two images. A normal image for the web site and then a thumbnail.

ResizeImage ( int width, int height, int maxWidth, int maxHeight ) : Size
SaveImage ( byte buffer, string fileName ) : bool

Saves the image.

Update ( Image image, byte buffer ) : void
UpdateImage ( Image image ) : void

Updates the image.

ValidateFile ( string filepath ) : bool

Validates that the file is allowed.

Method Details

DeleteImage() public static method

public static DeleteImage ( Image image ) : void
image Subtext.Framework.Components.Image
return void

EnsureDirectory() public static method

public static EnsureDirectory ( string directoryPath ) : void
directoryPath string
return void

GalleryVirtualUrl() public static method

Returns the url path to the gallery for the specified category.
public static GalleryVirtualUrl ( int categoryid ) : string
categoryid int The categoryid.
return string

GetFileStream() public static method

gets the bytes for the posted file
public static GetFileStream ( HttpPostedFile objFile ) : byte[]
objFile HttpPostedFile The obj file.
return byte[]

GetImagesByCategoryID() public static method

public static GetImagesByCategoryID ( int catID, bool activeOnly ) : ImageCollection
catID int
activeOnly bool
return ImageCollection

GetSingleImage() public static method

public static GetSingleImage ( int imageId, bool activeOnly ) : Image
imageId int
activeOnly bool
return Subtext.Framework.Components.Image

InsertImage() public static method

Inserts the image.
public static InsertImage ( Image image, byte Buffer ) : int
image Subtext.Framework.Components.Image The image.
Buffer byte The buffer.
return int

LocalGalleryFilePath() public static method

Returns the physical gallery path for the specified category.
public static LocalGalleryFilePath ( int categoryid ) : string
categoryid int The categoryid.
return string

MakeAlbumImages() public static method

Saves two images. A normal image for the web site and then a thumbnail.
public static MakeAlbumImages ( Image image ) : void
image Subtext.Framework.Components.Image Original image to process.
return void

ResizeImage() public static method

public static ResizeImage ( int width, int height, int maxWidth, int maxHeight ) : Size
width int
height int
maxWidth int
maxHeight int
return System.Drawing.Size

SaveImage() public static method

Saves the image.
public static SaveImage ( byte buffer, string fileName ) : bool
buffer byte The buffer.
fileName string Name of the file.
return bool

Update() public static method

public static Update ( Image image, byte buffer ) : void
image Subtext.Framework.Components.Image
buffer byte
return void

UpdateImage() public static method

Updates the image.
public static UpdateImage ( Image image ) : void
image Subtext.Framework.Components.Image The image.
return void

ValidateFile() public static method

Validates that the file is allowed.
public static ValidateFile ( string filepath ) : bool
filepath string The filepath.
return bool