C# Class Microsoft.Web.Samples.ImageOptimizations

Automates the creation of sprites and base64 inlining for CSS
ファイルを表示 Open project: stratsys/SpriteIt Class Usage Examples

Public Methods

Method Description
ProcessDirectory ( string path ) : bool

Executes the image optimizer on a specific subdirectory of the root image directory (non-recursive)

Private Methods

Method Description
DeleteSpriteFile ( string path ) : bool

Checks if the image at the path is a sprite generated by the framework, and deletes it if it was

GenerateCss ( ImageInfo imageInfo, string fileExtension, TextWriter cssOutput ) : void
GenerateCssBackgroundLow ( string identation, TextWriter cssOutput, string fileExtension, int xOffset, int yOffset ) : void
GenerateSprite ( string path, ImageSettings settings, SpriteInfo spriteInfo, TextWriter cssLowCompatOutput ) : void
GenerateSpriteFileName ( string fileExtension ) : string
GetEncoderInfo ( string format ) : System.Drawing.Imaging.ImageCodecInfo
GetOffsetPosition ( int offset ) : string
GetSettings ( string path ) : ImageSettings
GetTrimmedPath ( string path ) : string
IsOutputSprite ( string path ) : bool

Checks if an image (passed by path or image name) is a sprite image or CSS file created by the framework

MakeCssSelector ( string pathToImage ) : string
MakePathRelative ( string fullPath ) : string
PerformOptimizations ( string path, ImageSettings settings, TextWriter cssLowCompatOutput, List imageLocations ) : void
TrimPathForCss ( string pathToImage ) : string

Method Details

ProcessDirectory() public method

Executes the image optimizer on a specific subdirectory of the root image directory (non-recursive)
public ProcessDirectory ( string path ) : bool
path string The path to the directory to be rebuilt
return bool