From de5fc14446abb1e05a96ecf5eedf710f1db76e77 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sat, 31 Jul 2021 10:42:12 +0300 Subject: [PATCH] Added Bing visual search support --- .../Properties/Resources.Designer.cs | 27 ++++-- ShareX.HelpersLib/Properties/Resources.resx | 3 + ShareX.UploadersLib/Enums.cs | 1 + .../ShareX.UploadersLib.csproj | 1 + .../BingVisualSearchSharingService.cs | 34 +++++++ ShareX/Forms/MainForm.Designer.cs | 26 ++++-- ShareX/Forms/MainForm.cs | 13 ++- ShareX/Forms/MainForm.resx | 24 +++-- ShareX/Properties/Resources.Designer.cs | 10 +++ ShareX/Properties/Resources.resx | 83 +++++++++--------- ShareX/Resources/Bing.png | Bin 0 -> 1530 bytes ShareX/ShareX.csproj | 3 + ShareX/TaskHelpers.cs | 7 +- ShareX/UploadInfoManager.cs | 9 +- 14 files changed, 171 insertions(+), 70 deletions(-) create mode 100644 ShareX.UploadersLib/SharingServices/BingVisualSearchSharingService.cs create mode 100644 ShareX/Resources/Bing.png diff --git a/ShareX.HelpersLib/Properties/Resources.Designer.cs b/ShareX.HelpersLib/Properties/Resources.Designer.cs index af9b8d914..e95f5531a 100644 --- a/ShareX.HelpersLib/Properties/Resources.Designer.cs +++ b/ShareX.HelpersLib/Properties/Resources.Designer.cs @@ -576,7 +576,7 @@ internal static string CodeMenuEntryFilename_RandomAnimal { } /// - /// Looks up a localized string similar to BottomCenter. + /// Looks up a localized string similar to Bottom center. /// internal static string ContentAlignment_BottomCenter { get { @@ -585,7 +585,7 @@ internal static string ContentAlignment_BottomCenter { } /// - /// Looks up a localized string similar to BottomLeft. + /// Looks up a localized string similar to Bottom left. /// internal static string ContentAlignment_BottomLeft { get { @@ -594,7 +594,7 @@ internal static string ContentAlignment_BottomLeft { } /// - /// Looks up a localized string similar to BottomRight. + /// Looks up a localized string similar to Bottom right. /// internal static string ContentAlignment_BottomRight { get { @@ -603,7 +603,7 @@ internal static string ContentAlignment_BottomRight { } /// - /// Looks up a localized string similar to MiddleCenter. + /// Looks up a localized string similar to Middle center. /// internal static string ContentAlignment_MiddleCenter { get { @@ -612,7 +612,7 @@ internal static string ContentAlignment_MiddleCenter { } /// - /// Looks up a localized string similar to MiddleLeft. + /// Looks up a localized string similar to Middle left. /// internal static string ContentAlignment_MiddleLeft { get { @@ -621,7 +621,7 @@ internal static string ContentAlignment_MiddleLeft { } /// - /// Looks up a localized string similar to MiddleRight. + /// Looks up a localized string similar to Middle right. /// internal static string ContentAlignment_MiddleRight { get { @@ -630,7 +630,7 @@ internal static string ContentAlignment_MiddleRight { } /// - /// Looks up a localized string similar to TopCenter. + /// Looks up a localized string similar to Top center. /// internal static string ContentAlignment_TopCenter { get { @@ -639,7 +639,7 @@ internal static string ContentAlignment_TopCenter { } /// - /// Looks up a localized string similar to TopLeft. + /// Looks up a localized string similar to Top left. /// internal static string ContentAlignment_TopLeft { get { @@ -648,7 +648,7 @@ internal static string ContentAlignment_TopLeft { } /// - /// Looks up a localized string similar to TopRight. + /// Looks up a localized string similar to Top right. /// internal static string ContentAlignment_TopRight { get { @@ -3838,6 +3838,15 @@ internal static string UpdateMessageBox_UpdateMessageBox_update_is_available { } } + /// + /// Looks up a localized string similar to Bing visual search. + /// + internal static string URLSharingServices_BingVisualSearch { + get { + return ResourceManager.GetString("URLSharingServices_BingVisualSearch", resourceCulture); + } + } + /// /// Looks up a localized string similar to Custom URL sharing service. /// diff --git a/ShareX.HelpersLib/Properties/Resources.resx b/ShareX.HelpersLib/Properties/Resources.resx index 130c2b633..e59b9984e 100644 --- a/ShareX.HelpersLib/Properties/Resources.resx +++ b/ShareX.HelpersLib/Properties/Resources.resx @@ -1370,4 +1370,7 @@ Would you like to download and install it? Bottom right + + Bing visual search + \ No newline at end of file diff --git a/ShareX.UploadersLib/Enums.cs b/ShareX.UploadersLib/Enums.cs index 5f9911247..2a526aa41 100644 --- a/ShareX.UploadersLib/Enums.cs +++ b/ShareX.UploadersLib/Enums.cs @@ -211,6 +211,7 @@ public enum URLSharingServices [Description("Pushbullet")] Pushbullet, GoogleImageSearch, // Localized + BingVisualSearch, // Localized CustomURLSharingService // Localized } diff --git a/ShareX.UploadersLib/ShareX.UploadersLib.csproj b/ShareX.UploadersLib/ShareX.UploadersLib.csproj index 20d996f44..ec69e1448 100644 --- a/ShareX.UploadersLib/ShareX.UploadersLib.csproj +++ b/ShareX.UploadersLib/ShareX.UploadersLib.csproj @@ -246,6 +246,7 @@ True Resources.resx + diff --git a/ShareX.UploadersLib/SharingServices/BingVisualSearchSharingService.cs b/ShareX.UploadersLib/SharingServices/BingVisualSearchSharingService.cs new file mode 100644 index 000000000..73994f617 --- /dev/null +++ b/ShareX.UploadersLib/SharingServices/BingVisualSearchSharingService.cs @@ -0,0 +1,34 @@ +#region License Information (GPL v3) + +/* + ShareX - A program that allows you to take screenshots and share any file type + Copyright (c) 2007-2021 ShareX Team + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Optionally you can also view the license at . +*/ + +#endregion License Information (GPL v3) + +namespace ShareX.UploadersLib.SharingServices +{ + public class BingVisualSearchSharingService : SimpleURLSharingService + { + public override URLSharingServices EnumValue { get; } = URLSharingServices.BingVisualSearch; + + protected override string URLFormatString { get; } = "https://www.bing.com/images/search?view=detailv2&iss=sbi&q=imgurl:{0}"; + } +} \ No newline at end of file diff --git a/ShareX/Forms/MainForm.Designer.cs b/ShareX/Forms/MainForm.Designer.cs index 8a59635fd..667f5e919 100644 --- a/ShareX/Forms/MainForm.Designer.cs +++ b/ShareX/Forms/MainForm.Designer.cs @@ -177,7 +177,8 @@ private void InitializeComponent() this.tsmiDeleteSelectedFile = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiShortenSelectedURL = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiShareSelectedURL = new System.Windows.Forms.ToolStripMenuItem(); - this.tsmiSearchImage = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiGoogleImageSearch = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiBingVisualSearch = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiShowQRCode = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiOCRImage = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiCombineImages = new System.Windows.Forms.ToolStripMenuItem(); @@ -1088,7 +1089,8 @@ private void InitializeComponent() this.tsmiDeleteSelectedFile, this.tsmiShortenSelectedURL, this.tsmiShareSelectedURL, - this.tsmiSearchImage, + this.tsmiGoogleImageSearch, + this.tsmiBingVisualSearch, this.tsmiShowQRCode, this.tsmiOCRImage, this.tsmiCombineImages, @@ -1446,12 +1448,19 @@ private void InitializeComponent() this.tsmiShareSelectedURL.Name = "tsmiShareSelectedURL"; resources.ApplyResources(this.tsmiShareSelectedURL, "tsmiShareSelectedURL"); // - // tsmiSearchImage + // tsmiGoogleImageSearch // - this.tsmiSearchImage.Image = global::ShareX.Properties.Resources.Google; - this.tsmiSearchImage.Name = "tsmiSearchImage"; - resources.ApplyResources(this.tsmiSearchImage, "tsmiSearchImage"); - this.tsmiSearchImage.Click += new System.EventHandler(this.tsmiSearchImage_Click); + this.tsmiGoogleImageSearch.Image = global::ShareX.Properties.Resources.Google; + this.tsmiGoogleImageSearch.Name = "tsmiGoogleImageSearch"; + resources.ApplyResources(this.tsmiGoogleImageSearch, "tsmiGoogleImageSearch"); + this.tsmiGoogleImageSearch.Click += new System.EventHandler(this.tsmiGoogleImageSearch_Click); + // + // tsmiBingVisualSearch + // + this.tsmiBingVisualSearch.Image = global::ShareX.Properties.Resources.Bing; + this.tsmiBingVisualSearch.Name = "tsmiBingVisualSearch"; + resources.ApplyResources(this.tsmiBingVisualSearch, "tsmiBingVisualSearch"); + this.tsmiBingVisualSearch.Click += new System.EventHandler(this.tsmiBingVisualSearch_Click); // // tsmiShowQRCode // @@ -2709,7 +2718,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem tsmiCombineImages; private System.Windows.Forms.ToolStripMenuItem tsmiOpenActionsToolbar; private System.Windows.Forms.ToolStripMenuItem tsmiDeleteSelectedItem; - private System.Windows.Forms.ToolStripMenuItem tsmiSearchImage; + private System.Windows.Forms.ToolStripMenuItem tsmiGoogleImageSearch; private System.Windows.Forms.Panel pNews; private System.Windows.Forms.Button btnCloseNews; private System.Windows.Forms.ToolStripMenuItem tsmiImageThumbnailer; @@ -2791,5 +2800,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripSeparator tssTrayTools4; private System.Windows.Forms.ToolStripMenuItem tsmiCombineImagesHorizontally; private System.Windows.Forms.ToolStripMenuItem tsmiCombineImagesVertically; + private System.Windows.Forms.ToolStripMenuItem tsmiBingVisualSearch; } } \ No newline at end of file diff --git a/ShareX/Forms/MainForm.cs b/ShareX/Forms/MainForm.cs index d1fb1356b..260e3132a 100644 --- a/ShareX/Forms/MainForm.cs +++ b/ShareX/Forms/MainForm.cs @@ -649,7 +649,7 @@ private void UpdateInfoManager() { cmsTaskInfo.SuspendLayout(); - tsmiStopUpload.Visible = tsmiOpen.Visible = tsmiCopy.Visible = tsmiShowErrors.Visible = tsmiShowResponse.Visible = tsmiSearchImage.Visible = + tsmiStopUpload.Visible = tsmiOpen.Visible = tsmiCopy.Visible = tsmiShowErrors.Visible = tsmiShowResponse.Visible = tsmiGoogleImageSearch.Visible = tsmiShowQRCode.Visible = tsmiOCRImage.Visible = tsmiCombineImages.Visible = tsmiUploadSelectedFile.Visible = tsmiDownloadSelectedURL.Visible = tsmiEditSelectedFile.Visible = tsmiAddImageEffects.Visible = tsmiRunAction.Visible = tsmiDeleteSelectedItem.Visible = tsmiDeleteSelectedFile.Visible = tsmiShortenSelectedURL.Visible = tsmiShareSelectedURL.Visible = false; @@ -765,7 +765,7 @@ private void UpdateInfoManager() tsmiDeleteSelectedFile.Visible = uim.SelectedItem.IsFileExist; tsmiShortenSelectedURL.Visible = uim.SelectedItem.IsURLExist; tsmiShareSelectedURL.Visible = uim.SelectedItem.IsURLExist; - tsmiSearchImage.Visible = uim.SelectedItem.IsURLExist; + tsmiGoogleImageSearch.Visible = uim.SelectedItem.IsURLExist; tsmiShowQRCode.Visible = uim.SelectedItem.IsURLExist; tsmiOCRImage.Visible = uim.SelectedItem.IsImageFile; tsmiCombineImages.Visible = uim.SelectedItems.Count(x => x.IsImageFile) > 1; @@ -2416,9 +2416,14 @@ private void tsmiAddImageEffects_Click(object sender, EventArgs e) uim.AddImageEffects(); } - private void tsmiSearchImage_Click(object sender, EventArgs e) + private void tsmiGoogleImageSearch_Click(object sender, EventArgs e) { - uim.SearchImage(); + uim.SearchImageUsingGoogle(); + } + + private void tsmiBingVisualSearch_Click(object sender, EventArgs e) + { + uim.SearchImageUsingBing(); } private void tsmiShowQRCode_Click(object sender, EventArgs e) diff --git a/ShareX/Forms/MainForm.resx b/ShareX/Forms/MainForm.resx index c1260da7f..f510185ce 100644 --- a/ShareX/Forms/MainForm.resx +++ b/ShareX/Forms/MainForm.resx @@ -1227,12 +1227,18 @@ Share URL - + 228, 22 - + Google image search... + + 228, 22 + + + Bing visual search... + 228, 22 @@ -1375,7 +1381,7 @@ Switch to thumbnail view - 229, 560 + 229, 582 cmsTaskInfo @@ -3075,10 +3081,16 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tsmiSearchImage + + tsmiGoogleImageSearch - + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsmiBingVisualSearch + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/ShareX/Properties/Resources.Designer.cs b/ShareX/Properties/Resources.Designer.cs index db5af51c5..a1e9f3615 100644 --- a/ShareX/Properties/Resources.Designer.cs +++ b/ShareX/Properties/Resources.Designer.cs @@ -747,6 +747,16 @@ public static System.Drawing.Bitmap bin { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Bing { + get { + object obj = ResourceManager.GetObject("Bing", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/ShareX/Properties/Resources.resx b/ShareX/Properties/Resources.resx index d0a4c0b28..0b438ff78 100644 --- a/ShareX/Properties/Resources.resx +++ b/ShareX/Properties/Resources.resx @@ -229,9 +229,6 @@ ..\Resources\control.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\heart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Changelog @@ -264,6 +261,11 @@ Would you like to restart ShareX? Indonesian + + Hold left down to drag +Right click to open menu +Middle click to close + ..\Resources\application-browser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -339,6 +341,12 @@ Would you like to restart ShareX? ..\Resources\monitor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Use new name: + + + ..\Resources\clipboard-block.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Are you sure you want to upload this screenshot? Press 'No' to cancel the current upload and disable screenshot auto uploading. @@ -349,9 +357,6 @@ Press 'No' to cancel the current upload and disable screenshot auto uploading. Show menu - - FFmpeg video and audio source can't both be "None". - ..\Resources\globe--arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -405,9 +410,6 @@ Would you like to automatically download it? URL to download and upload - - Clipboard content: Text (Length: {0}) - Preview: @@ -423,12 +425,19 @@ Would you like to automatically download it? X: {0}, Y: {1}, Width: {2}, Height: {3} - - Would you like to reset ShareX settings? + + ..\Resources\heart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a {0} is about to be uploaded to {1}. You may choose a different destination. + + Unable to register {0}: + +{1} + +Please select a different hotkey or quit the conflicting application and reopen ShareX. + Drop here @@ -455,6 +464,9 @@ Are you sure you want to continue? ..\Resources\application-list.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + URL shortener: {0} + ..\Resources\crown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -488,8 +500,8 @@ Are you sure you want to continue? ..\Resources\Patreon-32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Use new name: + + ..\Resources\camera.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\wrench-screwdriver.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -515,8 +527,8 @@ Are you sure you want to continue? Startup has been enabled by your organization - - Choose ShareX personal folder path + + ..\Resources\clock-select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a {0} configuration is invalid or missing. Please check "Destination settings" window to configure it. @@ -545,6 +557,9 @@ Are you sure you want to continue? ..\Resources\ir.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\application-tile-vertical.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ui-scroll-pane-image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -595,8 +610,8 @@ You can later disable it from "After capture tasks" menu. ..\Resources\disk-rename.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\clipboard-block.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\cross.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\image-export.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -735,8 +750,8 @@ Would you like to restart ShareX? ..\Resources\folder-stand.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - URL shortener: {0} + + Choose ShareX personal folder path ..\Resources\pt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -837,12 +852,8 @@ Would you like to restart ShareX? Russian - - Unable to register {0}: - -{1} - -Please select a different hotkey or quit the conflicting application and reopen ShareX. + + FFmpeg video and audio source can't both be "None". ..\Resources\layer-shape.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -850,9 +861,6 @@ Please select a different hotkey or quit the conflicting application and reopen Upload with ShareX - - ..\Resources\clock-select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\inbox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -902,6 +910,9 @@ Please run ShareX as administrator to change personal folder path. ..\Resources\images-stack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Would you like to reset ShareX settings? + ..\Resources\layout-select-sidebar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -920,9 +931,6 @@ Please run ShareX as administrator to change personal folder path. ..\Resources\color.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\camera.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\image-saturation.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1001,10 +1009,8 @@ Please run ShareX as administrator to change personal folder path. ..\Resources\tick-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Hold left down to drag -Right click to open menu -Middle click to close + + Clipboard content: Text (Length: {0}) ..\Resources\navigation-000-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1021,9 +1027,6 @@ Middle click to close ..\Resources\drive-upload.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\cross.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Hotkey registration failed @@ -1079,7 +1082,7 @@ Middle click to close ..\Resources\TaskCompletedSound.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\application-tile-vertical.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Bing.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/ShareX/Resources/Bing.png b/ShareX/Resources/Bing.png new file mode 100644 index 0000000000000000000000000000000000000000..bfdcd07bc11a35d96d37dbf14ded029f3ba0bb75 GIT binary patch literal 1530 zcmZ{jc~Fx_6u=is0JU}^ii(N^4Jb$CBY^}0YJhwuTp=c)C{lxf;7Jrbz>Y?t6}3_d zRTxJ`u#Q%kwon|)s6Ye+ss#Z%zV~K#e{c5+m&01R zc+Fw}z|v4QlLs|nq1k=`d*;2X%}`mT1Vsh`Q1!!-*#z8zF_F!S1R%>508tJA({M@j z5r9(&04f0h^kM*332#5y83=&o5H}(kHJi=b#Nz?=3qr3S53C&z_$*H*=uajB{xs2{ zRGa*(P4ucs|6iy4%cuMwO!@shMXNPKq1Mg&l}^KfPyL*?c$QW&1IM0?lbc_R(~4)H zb^R;ds@H02!8CMO-ucn7YsB~ZB&B|i_+}XCmit^bkztf{kRlr2E*l_cjkz~XxU_uY z^uF~@H?D2duINy%YgX`kd%TY8+|%X6lzxXqNo=2#l&YoYkNV_%a8B#q*VpZlpkhAI zFiKPo+@AgY-H1@d{=>j}sEP0EMk`EF4W@{vW5l>&LBAv@M@>I5;(K8@y2s2cRBwqN za^v??g~MSF3}hkZc@T?|nRm;~v~vdX2|ZtG-X)#io~Ng08+hIGF_QVX9;-aoL0-xJd-gLt z!V%Y`_fD~cd;6rD;zmR6Xtw{Pre9I}o>w91O83+c#Q5R${6WvX3S#tdc(s9Du4R^L zf^KR8uW4x_4dt|&bX2)HVRU2EkTYk9$Q|M~m^jbILd!9ImftoLQjEbI1?1>C&&ES5bUW^1 zA;qxQ!M9C$%IJlE;AjSq!v}T}!)a9FgMJ6A0bMAFSb*x~T(nZmK)GT(s@EfEeg_^U zh)_9-&qq+a;4uTuGHMwpOR8d^#2OQxcg0wlz*3kP8m#upC#7k0!We63Y#~yO#w@C$ z#?CHFTEi+KrM1C*Ee?dUm>?JD$c7V}jL=BbX2izHhCp#z_c0TiOGBAK(SENI1%$5< zvUjySMtrNVu(3IhWx?8FD}298e8a}N-_KsJ$hPp};J(4(MSP13&Q|hh0@upI&)#-r z2;ks?UGQQt!E?ja$cwRVRtSK{=;WA56#K?WshnrHWeas5nVJ#jcm7mEteabX8aVT|zM~CV%An?yMG=&yEh$x}P z+w8fBeQ67-k`K1u+M0qro62fkJhqAfa*qjWgq`nQ!iz|>V4mQar6nP7IluZw#jfAI zSv*12O3TuH;T5N(YFZD$t#ZKDLXcN7cfT#}G5u&dlP7=V2+xsHV<}aJKMv!*8A#Cj=by^ACW~3 z)MTnBN}if9o3b4{gzVJVvrXAYWKP?%W);fn(I0oFb~-qIdOuPj!{gEh>#kjIWG^!; z65w=B=O-uKycfmY4dYyNpS*pmS!91NCF# + + + diff --git a/ShareX/TaskHelpers.cs b/ShareX/TaskHelpers.cs index 7216a4bbb..b28e37be1 100644 --- a/ShareX/TaskHelpers.cs +++ b/ShareX/TaskHelpers.cs @@ -1075,11 +1075,16 @@ public static void OpenRuler(TaskSettings taskSettings = null) RegionCaptureTasks.ShowScreenRuler(taskSettings.CaptureSettings.SurfaceOptions); } - public static void SearchImage(string url) + public static void SearchImageUsingGoogle(string url) { new GoogleImageSearchSharingService().CreateSharer(null, null).ShareURL(url); } + public static void SearchImageUsingBing(string url) + { + new BingVisualSearchSharingService().CreateSharer(null, null).ShareURL(url); + } + public static async Task OCRImage(TaskSettings taskSettings = null) { if (IsUploadAllowed()) diff --git a/ShareX/UploadInfoManager.cs b/ShareX/UploadInfoManager.cs index 9f58ce0f0..25d0c075e 100644 --- a/ShareX/UploadInfoManager.cs +++ b/ShareX/UploadInfoManager.cs @@ -372,9 +372,14 @@ public void ShareURL(URLSharingServices urlSharingService) if (IsItemSelected && SelectedItem.IsURLExist) UploadManager.ShareURL(SelectedItem.Info.Result.ToString(), urlSharingService); } - public void SearchImage() + public void SearchImageUsingGoogle() { - if (IsItemSelected && SelectedItem.IsURLExist) TaskHelpers.SearchImage(SelectedItem.Info.Result.URL); + if (IsItemSelected && SelectedItem.IsURLExist) TaskHelpers.SearchImageUsingGoogle(SelectedItem.Info.Result.URL); + } + + public void SearchImageUsingBing() + { + if (IsItemSelected && SelectedItem.IsURLExist) TaskHelpers.SearchImageUsingBing(SelectedItem.Info.Result.URL); } public void ShowQRCode()