Class ImageHelper
- Namespace
- Dynamicweb.Imaging
- Assembly
- Dynamicweb.Core.dll
Helper class to generate preview link in format /Admin/Public/GetImage.ashx
public static class ImageHelper
- Inheritance
-
ImageHelper
- Inherited Members
Methods
TryGetImagePreviewPath(string, bool, out string)
Gets preview link for given image path
public static bool TryGetImagePreviewPath(string filePath, bool skipValidation, out string previewPath)
Parameters
filePathstringImage path for preview
skipValidationboolSkip image validation (requires Admin authentication)
previewPathstringOutput preview path as virtual path is it is IsImageFile(string), and as preview url if it is IsResizableImageFile(string)
Returns
- bool
truewhen given path is image
TryGetImagePreviewPath(string, int, int, bool, out string)
Gets preview link for given image path and dimensions
public static bool TryGetImagePreviewPath(string filePath, int width, int height, bool skipValidation, out string previewPath)
Parameters
filePathstringImage path for preview
widthintPreview image width
heightintPreview image height
skipValidationboolSkip image validation (requires Admin authentication)
previewPathstringOutput preview path as virtual path is it is IsImageFile(string), and as preview url if it is IsResizableImageFile(string)
Returns
- bool
truewhen given path is image
TryGetImagePreviewPath(string, int, int, out string)
Gets preview link for given image path and dimensions
public static bool TryGetImagePreviewPath(string filePath, int width, int height, out string previewPath)
Parameters
filePathstringImage path for preview
widthintPreview image width
heightintPreview image height
previewPathstringOutput preview path as virtual path is it is IsImageFile(string), and as preview url if it is IsResizableImageFile(string)
Returns
- bool
truewhen given path is image
TryGetImagePreviewPath(string, out string)
Gets preview link for given image path
public static bool TryGetImagePreviewPath(string filePath, out string previewPath)
Parameters
filePathstringImage path for preview
previewPathstringOutput preview path as virtual path is it is IsImageFile(string), and as preview url if it is IsResizableImageFile(string)
Returns
- bool
truewhen given path is image
TryGetImagePreviewPathFromParameters(ConvertParameters, bool, out string)
Gets preview link for given preview image conversion parameters
public static bool TryGetImagePreviewPathFromParameters(ConvertParameters convertParameters, bool skipValidation, out string previewPath)
Parameters
convertParametersConvertParametersPreview image conversion parameters
skipValidationboolSkip image validation (requires Admin authentication)
previewPathstringOutput preview path as virtual path is it is IsImageFile(string), and as preview url if it is IsResizableImageFile(string)
Returns
- bool
truewhen given path is image
TryGetImagePreviewPathFromParameters(ConvertParameters, out string)
Gets preview link for given preview image conversion parameters
public static bool TryGetImagePreviewPathFromParameters(ConvertParameters convertParameters, out string previewPath)
Parameters
convertParametersConvertParametersPreview image conversion parameters
previewPathstringOutput preview path as virtual path is it is IsImageFile(string), and as preview url if it is IsResizableImageFile(string)
Returns
- bool
truewhen given path is image