Inheritance: ICloneable
Beispiel #1
0
 public string SetEffects(string publicId, string effectName)
 {
     Transformation transformation = new Transformation().Effect(effectName);
     GetResourceResult result = Cloudinary.GetResource(new GetResourceParams(publicId));
     String url = api.UrlImgUp.Transform(transformation).BuildUrl("v" + result.Version + "/" + publicId + "." + result.Format);
     return url;
 }
 public Transformation Chain()
 {
     Transformation nested = this.Clone();
     nested.m_nestedTransforms = null;
     m_nestedTransforms.Add(nested);
     Transformation transform = new Transformation(m_nestedTransforms);
     return transform;
 }
        /// <summary>
        /// Gets URL to download tag cloud as ZIP package
        /// </summary>
        /// <param name="tag">The tag.</param>
        /// <param name="transform">The transformation.</param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentException">Tag should be specified!</exception>
        public string DownloadZip(string tag, Transformation transform)
        {
            if (String.IsNullOrEmpty(tag))
                throw new ArgumentException("Tag should be specified!");

            UrlBuilder urlBuilder = new UrlBuilder(
               m_api.ApiUrlV
               .ResourceType("image")
               .Action("download_tag.zip")
               .BuildUrl());

            var parameters = new SortedDictionary<string, object>();

            parameters.Add("tag", tag);

            if (transform != null)
                parameters.Add("transformation", transform.Generate());

            return GetDownloadUrl(urlBuilder, parameters);
        }
Beispiel #4
0
 public Url PosterTransform(Transformation transformation)
 {
     m_posterTransformation = transformation;
     return this;
 }
Beispiel #5
0
        public Url SourceTransformationFor(string source, Transformation transform)
        {
            if (m_sourceTransforms == null)
                m_sourceTransforms = new Dictionary<string, Transformation>();

            m_sourceTransforms.Add(source, transform);

            return this;
        }
Beispiel #6
0
 public Url Transform(Transformation transformation)
 {
     m_transformation = transformation;
     return this;
 }
 /// <summary>
 /// Set transformation to apply on the original image
 /// </summary>
 public ResponsiveBreakpoint Transformation(Transformation transformation)
 {
     this[TRANSFORMATION] = transformation.ToString();
     return this;
 }
 public Condition SetParent(Transformation parent)
 {
     Parent = parent;
     return this;
 }
 public Transformation Chain()
 {
     Transformation nested = this.Clone();
     nested.m_nestedTransforms = null;
     m_nestedTransforms.Add(nested);
     m_transformParams = new Dictionary<string, object>();
     Transformation transform = new Transformation(m_nestedTransforms);
     return transform;
 }
Beispiel #10
0
 public Url PosterTransform(Transformation transformation)
 {
     m_posterTransformation = transformation;
     return(this);
 }
Beispiel #11
0
 public Url Transform(Transformation transformation)
 {
     m_transformation = transformation;
     return(this);
 }
Beispiel #12
0
 public Condition SetParent(Transformation parent)
 {
     Parent = parent;
     return(this);
 }
Beispiel #13
0
 /// <summary>
 /// The base transformation to first apply to the image before finding the best breakpoints.
 /// </summary>
 public ResponsiveBreakpoint Transformation(Transformation transformation)
 {
     this[TRANSFORMATION] = transformation.ToString();
     return(this);
 }