How can I search a local image with Google reverse image search? - delphi

From a Delphi 32-bit Windows VCL Application in Delphi 11 Alexandria, is it possible to programmatically reverse-search Google Images by uploading a local image file?
The Google Reverse Image API is documented here:
https://serpapi.com/google-reverse-image
But how to use it by uploading a local image from a Delphi program?

Related

Add a digital signature to PDF file from Delphi

I have purchased a digital signature and have the dongle for it. I have a Delphi project from which I generate invoice PDF and I need to add that digital signature to the pdf files created. Is there any way I can do this programmatically using Delphi? I am looking for a free Delphi component to use. I am currently using RAD Studio 10.4. I am making the PDF using Microsoft print to PDF and sometimes dopdf.
I have checked the below but it is a paid product.
https://www.gnostice.com/nl_article.asp?id=268&t=Generating_Digitally_Signed_PDF_Documents_In_Delphi
I have checked this Acrobat component, but I am not able to figure out if we can sign the pdf using this, like we sign manually:
https://www.thoughtco.com/adobe-acrobat-pdf-files-delphi-applications-1056893

Encoding of video using built in Windows functionality (Media Foundation)?

I've been investigating various method of exporting video from my FMX application, in particular mp4 using the h.264 codec. One method is to use FFmpeg with the FFVCL components. The down side of this is that including FFmpeg dlls with my application increases the download size. The other problem is the licensing issue of using the libx264 encoder. There is a free to use libopenh264 encoder but isn't as good as it only supports the Baseline profile.
However, Windows has video encoding built in which includes the full h.264 with High profile (mfh264enc.dll). This seems like the ideal solution for high quality video export while minimising the size of my application and avoiding licensing problems. The following page gives information on the video encoding interface in Windows.
https://learn.microsoft.com/en-us/windows/win32/medfound/overview-of-encoding-in-media-foundation
My question is how can I call this from Delphi to export video from a sequence of images stored in TBitmap? My application is FMX but initially only for Windows. Has anyone already created a Delphi interface for video encoding using the built in Windows dlls? I don't have much experience with calling dlls from Delphi. How much work would it be to create an interface myself?

Adobe PDF Reader Plugin in TWEBBROWSER on new PC

according to PDF in TWEbbrowser I tried to run an selfprogrammed Delphi Prg which displays the PDF in a TWEBBROWSER component fine. But on 2 new PCs, where I just installed the Adobe DC PDF Reader I only see a gray window - no PDF anymore. How to fix this? I can see the PDF in IE. I Have Delphi Berlin.
Thanks for help
The reason why PFD isn't correctly shown in TWebBrowser is the fact that by default TWebBrowser is opening web pages in Compatibility mode. This means that the web pages are opened in Interent Explorer 7 mode wihtout any extensions. And in order for you to be able to open PDF in Internet explorer it is done so in Acrobar Reader Web Extension.
In order to make TWebBrowser open web pages in compatibility mode for newest IE version you need to Opt in to the browser emulation feature using the documented registry key
NOTE: You need to opt in to the browser emulation on every computer where your program is used.
Or you could switch to the use of TEdgeBrowser instead as Robson Benedito suggested in his answer.
TWebBrowser component, when in Windows, navigates using the old Internet Explorer (not Microsoft Edge).
To ensure that it works you should open Microsoft Internet explorer and try to open this document in the machine that is showing the problem.
If it doesn't open you should fix it inside IE before open in you Delphi app. If it does, it could be an incompatibility with this Adobe plugin and the engine provided/used by TWebBrowser. In this case you can switch to TEdgeBrowser component that provides you the ability to have you own browser (with Chromnium) even if the Microsoft Edge is not installed (http://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_TEdgeBrowser_Component_and_Changes_to_the_TWebBrowser_Component).
With TEdgeBrowser you can open PDF directly without using plugin (even those installed in Windows).
Using TWebBrowser can also lead you to others problems with others PCs depending on the Internet Explorer (like proxy/javascript/plugins/etc).

Display all images in a folder using a list view item in Delphi

I am using RAD Studio xe6 and I have a simple Firemonkey form, what I want to do is get all Images that are in a folder and display them in a list for the user to see, is this possible, and if yes how.
Delphi already ships with a sample program which does similar thing that you seek. The sample program is called FireFlow. If you haven't installed sample programs while installing Delphi you can get the sample program from:
http://docwiki.embarcadero.com/CodeExamples/XE6/en/FMX.FireFlow_Sample
But othervise what you want to do is first search the specific directory for supported image files. To do this use FindFirst, FindNext.
Then you need to decide how are you going to display these images. Now if you intend to display them inside the listbox controll do check the CustomListBox sample which you can also get from web here:
http://docwiki.embarcadero.com/CodeExamples/XE6/en/FMX.CustomListBox_Sample

Integrate with camera on Windows 8 Tablet

We would like to integrate the device camera into an application written in Delphi. The device is a Dell Windows 8 tablet. What we need is quite simple. A button would launch the camera, passing a file name for the stored image. Once the picture is taken, and stored in the specified file name, control would pass back to our application. Having control go back to the Delphi app is not as important; we could write a loop to look for it and have it come to front once it is found.
What would be the simplest way to accomplish this?
Can the camera be called passing a filename parameter?
Windows comes with WIA, Window Image Acquisition which can be used for this.
Here are some Delphi specific links:
Delphi: WIA to take image from digital Camera connected to USB
How to control a camera with Delphi
http://www.neunbeere.de/UseNet/WIA.html

Resources