RestImageResize/OpenWaveRestApiEncoder.cs
/// <summary>
/// Builds path to transformed image(cached) according te image transformation URI.
/// </summary>
/// <param name="uri">Image transformation URI</param>
/// <returns>Path where transformed image should be placed after transformation.</returns>
Builds path to transformed image(cached) according te image transformation URI.
Builds path to transformed image ( cached ) according te image transformation URI .
public virtual string BuldPathToTransformedImage(Uri uri)
        {
            if (IsSupportedUri(uri))
            {
                var transformQuery = ImageTransformQuery.FromQueryString(uri.GetQueryString(), DefaultImageTransform);
                var transformation = ImageTransformationFactory.TryCreate(transformQuery);
                if (transformation != null)
                {
                    var imageFile = ImageFileProvider.GetFile(Url.Parse(uri.ToString()));
                    if (imageFile != null)
                    {
                        string transformedImagePath = GetTransformedImagePath(imageFile, transformation, imageFile.Url.Path.GetFileExtension());
                        return transformedImagePath;
                    }
                }
            }
            return null;
        }
public virtual string BuldPathToTransformedImage ( Uri uri ) { if ( IsSupportedUri ( uri ) ) { var transformQuery = ImageTransformQuery . FromQueryString ( uri . GetQueryString ( ) , DefaultImageTransform ) ; var transformation = ImageTransformationFactory . TryCreate ( transformQuery ) ; if ( transformation != null ) { var imageFile = ImageFileProvider . GetFile ( Url . Parse ( uri . ToString ( ) ) ) ; if ( imageFile != null ) { string transformedImagePath = GetTransformedImagePath ( imageFile , transformation , imageFile . Url . Path . GetFileExtension ( ) ) ; return transformedImagePath ; } } } return null ; }
Builds path to transformed image(cached) according te image transformation URI.
Builds path to transformed image ( cached ) according te image transformation URI .
Path where transformed image should be placed after transformation.
Path where transformed image should be placed after transformation .
uri
Uri
Image transformation URI
Image transformation URI