public ImageUrlBuilderExpression(ImageUrlBuilder builder) { if (builder == null) throw new ArgumentNullException("builder"); this.builder = builder; }
/// <summary> /// The path to the fallback image, or a named preset if the image is not found. /// For more information see http://imageresizing.net/docs/reference /// </summary> public static ImageUrlBuilder Image404(this ImageUrlBuilder builder, string fallbackImagePathOrPresetName) { if (string.IsNullOrEmpty(fallbackImagePathOrPresetName)) { throw new ArgumentNullException("fallbackImagePathOrPresetName"); } return(builder.SetParameter(MiscCommands.Image404, fallbackImagePathOrPresetName)); }
public ImageUrlBuilderExpression(ImageUrlBuilder builder) { if (builder == null) { throw new ArgumentNullException("builder"); } this.builder = builder; }
/// <summary> /// Allows you to define sets of settings in Web.config and reference them by name. /// </summary> /// <param name="presets">A list of preset settings groups to apply. <example>preset1,preset2,preset3</example></param> public static ImageUrlBuilder ApplyPresets(this ImageUrlBuilder builder, string presets) { if (string.IsNullOrEmpty(presets)) { throw new ArgumentNullException("presets"); } return(builder.SetParameter(MiscCommands.Preset, presets)); }
/// <summary> /// The name of one or more watermark layers (or layer groups) to render. /// For more information see http://imageresizing.net/plugins/watermark /// </summary> public static ImageUrlBuilder Watermark(this ImageUrlBuilder builder, string watermarkNames) { if (string.IsNullOrEmpty(watermarkNames)) { throw new ArgumentNullException("watermarkNames"); } return(builder.SetParameter(MiscCommands.Watermark, watermarkNames)); }
/// <summary> /// Adds Styling options to the <see cref="ImageUrlBuilder"/> /// </summary> /// <exception cref="System.ArgumentNullException">If the builder or configure action is null</exception> /// <example> /// This example adds 5px padding to the image and applies a 2px black border /// <code> /// builder.Style(img => img.PaddingWidth(5).BorderColor("000000").BorderWidth(2)) /// </code> /// </example> public static ImageUrlBuilder Style(this ImageUrlBuilder builder, Action <StyleExpression> configure) { if (builder == null) { throw new ArgumentNullException("builder"); } if (configure == null) { throw new ArgumentNullException("configure"); } configure(new StyleExpression(builder)); return(builder); }
/// <summary> /// The DPI at which the image should be printed. Ignored by all browsers, most operating systems, and most printers. /// </summary> public static ImageUrlBuilder DPI(this ImageUrlBuilder builder, DPIOptions dpiOption) { return(builder.SetParameter(MiscCommands.DPI, ((int)dpiOption).ToString())); }
public GradientExpression(ImageUrlBuilder builder) : base(builder) { }
/// <summary> /// Always forces the image to be cached even if it wasn't modified by the resizing module. /// No disables caching even if it was. /// </summary> public static ImageUrlBuilder Cache(this ImageUrlBuilder builder, CacheOptions cacheOption = CacheOptions.Default) { return(builder.SetParameter(MiscCommands.Cache, cacheOption.ToString().ToLowerInvariant())); }
/// <summary> /// Always forces the image to be re-encoded even if it wasn't modified. /// No prevents the image from being modified. /// </summary> public static ImageUrlBuilder Process(this ImageUrlBuilder builder, ProcessOptions processOption = ProcessOptions.Default) { return(builder.SetParameter(MiscCommands.Process, processOption.ToString().ToLowerInvariant())); }
internal StyleExpression(ImageUrlBuilder builder) : base(builder) { }
/// <summary> /// Ignores the ICC profile embedded in the source image /// </summary> public static ImageUrlBuilder IgnoreICC(this ImageUrlBuilder builder) { return(builder.SetParameter(MiscCommands.IgnoreICC, true.ToString().ToLowerInvariant())); }
internal TransformExpression(ImageUrlBuilder builder) : base(builder) { }
public virtual ImageUrlBuilderExpression Initialize(ImageUrlBuilder builder) { this.builder = builder; return(this); }
public virtual ImageUrlBuilderExpression Initialize(ImageUrlBuilder builder) { this.builder = builder; return this; }
/// <summary> /// Applies a url modifier for use with the remote reader plugin. /// This modifier requires that the urls you pass to the builder are absolute e.g. http://somedomain.com/image.jpg /// For more information see http://imageresizing.net/plugins/remotereader. /// </summary> /// <param name="urlBuilder">The <see cref="ImageUrlBuilder"/> instance to apply the modifier to.</param> /// <returns></returns> public static ImageUrlBuilder FromRemote(this ImageUrlBuilder builder) { builder.AddModifier(s => CreateRemoteUrl(s)); return(builder); }
internal DropShadowExpression(ImageUrlBuilder builder) : base(builder) { }
internal OutputExpression(ImageUrlBuilder builder) : base(builder) { }
internal ResizeExpression(ImageUrlBuilder builder) : base(builder) { }
public SimpleFiltersExpression(ImageUrlBuilder builder) : base(builder) { }