Amend is a Platform–as-a-Service (PaaS) solution hosted on cloud. Amend helps you manage your application’s image resources in the cloud without having to worry about scale and performance. The resources are delivered by high-performance servers through Content Delivery Network (CDN).
Resources are uploaded, managed, and transformed using amend’s easy to use APIs and SDKs. Infrastructure used for these operations is infinitely scalable for handling high load and bursts of traffic.
Amend provides URL based APIs and SDKS that can be easily integrated with any Web or Mobile development framework.
For projects based on Microsoft .NET Framework, amend provides a library for simplifying the integration even further.
[Getting started guide for .NET]
amend .NET library is available as NuGet package at https://nuget.org/packages/amend
Please see NuGet Documentation at http://docs.nuget.org/ for instructions of how to work with NuGet packages.
- Download NuGet Package Manager at http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c
- Use Visual Studio to create a new project and choose .NET 3.5 as the target framework.
- Right click on the project in Solution Explorer and click on Manage NuGet packages...
- Type Amend in the search box at the upper right corner.
- When Amend package appears, click on the Install button.
- After the package is installed click Close button.
- Setup is done and you can now use Amend.
- Go to https://nuget.org/packages/amend and download NuGet package.
- NuGet package is a ZIP archive that could be extracted using any unzip tool.
- NuGet package contains amend.dll, xml documentation and this file.
Sign up for a free account so you can try out image transformations and seamless image delivery through CDN.
Note: Replace demo
in all the following examples with your amend's amend name
.
Accessing an uploaded image with the baby
public ID through a CDN:
http://amend.cloud/test/image/baby
Generating a 150x100 version of the baby
image and downloading it through a CDN:
http://amend.cloud/test/image/w_150,h_100,fit_fill/baby
Converting to a 150x100 PNG with rounded corners of 25 pixels:
http://amend.cloud/test/image/w_150,h_100,fit_fill/r_25/baby
For plenty more transformation options, see our image transformations documentation.
Each request for building a URL of a remote cloud resource must have the amend_name
parameter set.
Each request to our secure APIs (e.g., image uploads) must have the access_key
and access_secret
parameters set.
Setting the amend_name
, access_key
and access_secret
parameters can be done either directly in each call to a amend method,
by when initializing the amend object.
The main entry point of the library is the Amend object.
Amend.setAmendName("my_amend_name");
Amend.setCredentials("my_access_key", "my_access_secret");
Assuming you have your amend configuration parameters defined (amend_name
, access_key
, access_secret
), uploading to amend is very simple.
The following example uploads a local JPG to the cloud:
Amend amend = new Amend();
Amend.AmendResponse resp = await amend.UploadAsync(System.IO.File.ReadAllBytes(@"c:\mypicture.jpg"));
The uploaded image is assigned a randomly generated public Name. The image is immediately available for download through a CDN:
string url = resp.CDNUrl;
http://amend.cloud/cloud_name/image/cloud_name112128
or you can get Image Name return by amend upload api
string imageName = resp.ImageName;
You can also specify your own Image Name:
Amend.AmendResponse resp = await amend.UploadAsync(System.IO.File.ReadAllBytes(@"c:\mypicture.jpg"),"MyOwnFileName");
http://amend.cloud/cloud_name/image/MyOwnFileName.jpg
Any image uploaded to amend can be transformed and embedded using powerful view helper methods:
The following example generates the url for accessing an uploaded baby
image while transforming it to fill a 100x150 rectangle and set on Image img
AmendOptions amendOptions = new AmendOptions().Transform(new Transform().Width(100).Height(150).Fit(Amend.FIT_FILL));
Amend.Init().Load('baby', amendOptions).Into(img);
Another example, emedding a smaller version of an uploaded image while generating a 90x90 face detection based thumbnail:
AmendOptions amendOptions = new AmendOptions().Transform(new Transform().Width(90).Height(90).Fit(Amend.FIT_FACE));
Amend.Init().Load('woman', amendOptions).Into(img);
Additional resources are available at:
Contact us at support@amend.cloud
Or via Twitter: @amend