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
|
@ -36,7 +36,7 @@ namespace GreenshotDropboxPlugin {
|
|||
private DropboxUtils() {
|
||||
}
|
||||
|
||||
public static string UploadToDropbox(Image image, OutputSettings outputSettings, string filename) {
|
||||
public static string UploadToDropbox(ISurface surfaceToUpload, OutputSettings outputSettings, string filename) {
|
||||
OAuthSession oAuth = new OAuthSession(DropBoxCredentials.CONSUMER_KEY, DropBoxCredentials.CONSUMER_SECRET);
|
||||
oAuth.BrowserSize = new Size(1080, 650);
|
||||
oAuth.CheckVerifier = false;
|
||||
|
@ -48,7 +48,7 @@ namespace GreenshotDropboxPlugin {
|
|||
oAuth.TokenSecret = config.DropboxTokenSecret;
|
||||
|
||||
try {
|
||||
ImageContainer imageToUpload = new ImageContainer(image, outputSettings, filename);
|
||||
SurfaceContainer imageToUpload = new SurfaceContainer(surfaceToUpload, outputSettings, filename);
|
||||
string uploadResponse = oAuth.MakeOAuthRequest(HTTPMethod.POST, "https://api-content.dropbox.com/1/files_put/sandbox/" + OAuthSession.UrlEncode3986(filename), null, null, imageToUpload);
|
||||
LOG.DebugFormat("Upload response: {0}", uploadResponse);
|
||||
} catch (Exception ex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue