mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Refactoring which replaces the Image in the ImageOutput for an ISurface, this makes it possible to save the Surface to any possible file format and even make it possible to pass some additional information in the OutputSettings. (Except reducing the colors, there are no other settings yet)
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2376 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
e11450f56f
commit
5541e2e1c7
27 changed files with 191 additions and 290 deletions
|
@ -44,7 +44,7 @@ namespace GreenshotFlickrPlugin {
|
|||
/// </summary>
|
||||
/// <param name="imageData">byte[] with image data</param>
|
||||
/// <returns>url to image</returns>
|
||||
public static string UploadToFlickr(Image image, OutputSettings outputSettings, string title, string filename) {
|
||||
public static string UploadToFlickr(ISurface surfaceToUpload, OutputSettings outputSettings, string title, string filename) {
|
||||
OAuthSession oAuth = new OAuthSession(FlickrCredentials.ConsumerKey, FlickrCredentials.ConsumerSecret);
|
||||
oAuth.BrowserSize = new Size(520, 800);
|
||||
oAuth.CheckVerifier = false;
|
||||
|
@ -76,7 +76,7 @@ namespace GreenshotFlickrPlugin {
|
|||
signedParameters.Add("safety_level", string.Format("{0}", (int)config.SafetyLevel));
|
||||
signedParameters.Add("hidden", config.HiddenFromSearch?"1":"2");
|
||||
IDictionary<string, object> otherParameters = new Dictionary<string, object>();
|
||||
otherParameters.Add("photo", new ImageContainer(image, outputSettings, filename));
|
||||
otherParameters.Add("photo", new SurfaceContainer(surfaceToUpload, outputSettings, filename));
|
||||
string response = oAuth.MakeOAuthRequest(HTTPMethod.POST, "http://api.flickr.com/services/upload/", signedParameters, otherParameters, null);
|
||||
string photoId = GetPhotoId(response);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue