Last active
April 28, 2016 03:32
-
-
Save Kevin-Bronsdijk/6ce3df2c5b3f18129aa51d490f45ef63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
ResizeImage = new ResizeImage {Height = 100, Width = 100, | |
BackgroundColor = "#ffffff" , Strategy = Strategy.exact, Enhance = true} | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var response = krakenClient.Optimize( | |
image, | |
"name-of-image.png", | |
new SeaMist.Model.Azure.OptimizeUploadRequest( | |
new Uri("http://awesome-website.com/kraken_results"), | |
new DataStore( | |
"account", | |
"key", | |
"container") | |
)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connection = KrakenConnection.Create("key", "secret"); | |
var krakenClient = new KrakenClient(connection); | |
var image = File.ReadAllBytes("your-image-location-on-disk.png"); | |
var response = await krakenClient.Optimize( | |
image, | |
"name-of-image.png", | |
new OptimizeUploadRequest(new Uri("http://awesome-website.com/kraken_results")) | |
{ | |
ResizeImage = new ResizeImage {Height = 100, Width = 100}, | |
WebP = true | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var image = File.ReadAllBytes("your-image-location-on-disk.png"); | |
var response = await krakenClient.OptimizeWait( | |
image, | |
"image-name.jpg", | |
new Model.S3.OptimizeUploadWaitRequest("account", "key", "container", "region") | |
{ | |
ResizeImage = new ResizeImage {Height = 100, Width = 100}, | |
WebP = true | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var response = await krakenClient.OptimizeWait( | |
image, | |
"image-name.jpg", | |
new Model.Azure.OptimizeUploadWaitRequest("account", "key","container") | |
{ | |
ResizeImage = new ResizeImage {Height = 100, Width = 100}, | |
WebP = true | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connection = KrakenConnection.Create("key", "secret"); | |
var krakenClient = new KrakenClient(connection); | |
var image = File.ReadAllBytes("your-image-location-on-disk.png"); | |
var response = await krakenClient.OptimizeWait( | |
image, | |
"name-of-image.png", | |
new OptimizeUploadWaitRequest | |
{ | |
ResizeImage = new ResizeImage {Height = 100, Width = 100, | |
BackgroundColor = "#ffffff" , Strategy = Strategy.exact}, | |
PreserveMeta = new[] {PreserveMeta.Geotag} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment