Пример #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;
 }
Пример #2
0
 public Transformation Chain()
 {
     Transformation nested = this.Clone();
     nested.m_nestedTransforms = null;
     m_nestedTransforms.Add(nested);
     Transformation transform = new Transformation(m_nestedTransforms);
     return transform;
 }
Пример #3
0
        /// <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);
        }
Пример #4
0
 public Url PosterTransform(Transformation transformation)
 {
     m_posterTransformation = transformation;
     return this;
 }
Пример #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;
        }
Пример #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;
 }
Пример #8
0
 public Condition SetParent(Transformation parent)
 {
     Parent = parent;
     return this;
 }
Пример #9
0
 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;
 }
Пример #10
0
 public Url PosterTransform(Transformation transformation)
 {
     m_posterTransformation = transformation;
     return(this);
 }
Пример #11
0
 public Url Transform(Transformation transformation)
 {
     m_transformation = transformation;
     return(this);
 }
Пример #12
0
 public Condition SetParent(Transformation parent)
 {
     Parent = parent;
     return(this);
 }
Пример #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);
 }