mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
Cleanup of unneeded code: Removed a unused property from the OAuthLoginForm and removed the using "imageforexport" as we only want the "background" image of the surface for our OCR.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2085 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
86d376a0dc
commit
f4f3a77e55
2 changed files with 14 additions and 21 deletions
|
@ -140,9 +140,10 @@ namespace GreenshotOCR {
|
|||
private const int MIN_HEIGHT = 130;
|
||||
public string DoOCR(ISurface surface) {
|
||||
string filePath = null;
|
||||
OutputSettings outputSettings = new OutputSettings(OutputFormat.bmp);
|
||||
OutputSettings outputSettings = new OutputSettings(OutputFormat.bmp, 0, true);
|
||||
|
||||
using (Image capturedImage = surface.GetImageForExport()) {
|
||||
// Use surface background image, this prevents having a mouse cursor in the way.
|
||||
Image capturedImage = surface.Image;
|
||||
if (capturedImage.Width < MIN_WIDTH || capturedImage.Height < MIN_HEIGHT) {
|
||||
LOG.Debug("Captured image is not big enough for OCR, growing image...");
|
||||
int newWidth = Math.Max(capturedImage.Width, MIN_WIDTH);
|
||||
|
@ -157,7 +158,6 @@ namespace GreenshotOCR {
|
|||
} else {
|
||||
filePath = host.SaveToTmpFile(capturedImage, outputSettings, null);
|
||||
}
|
||||
}
|
||||
|
||||
LOG.Debug("Saved tmp file to: " + filePath);
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ namespace GreenshotPlugin.Controls {
|
|||
private string callbackUrl = null;
|
||||
private String _token;
|
||||
private String _verifier;
|
||||
private String _tokenSecret;
|
||||
|
||||
public String Token {
|
||||
get {
|
||||
|
@ -51,12 +50,6 @@ namespace GreenshotPlugin.Controls {
|
|||
}
|
||||
}
|
||||
|
||||
public String TokenSecret {
|
||||
get {
|
||||
return _tokenSecret;
|
||||
}
|
||||
}
|
||||
|
||||
public OAuthLoginForm(OAuthSession o, string browserTitle, Size size, string authorizationLink, string callbackUrl) {
|
||||
this.callbackUrl = callbackUrl;
|
||||
_token = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue