Delphi

MindGlow Is A Powerful Mindful Meditation App

According to the US CDC, the social and interpersonal restrictions which arose during the COVID-19 world pandemic was accompanied by a substantial uptick in stress and anxiety levels. People were apparently finding that the isolation brought about social distancing measures along with a corresponding impact on work and financial insecurity was unsettling and many seem to have found it difficult to deal with. One growth area for developers was in producing apps which helped mitigate those stress levels by encouraging techniques like mindfulness. MindGlow Mindfulness Android mobile app is powered by Delphi For anyone that wishes to resolve emotional issues, enter relaxed states, creative states, and highly functioning learning at the touch of a button, then MindGlow is for you. MindGlow makes use of “binaural beats” sound technology. Binaural beats is the use of specific different synchronized tones to each ear. This kind of use of acoustic waves is believed to be able to promote mindfulness, a calming effect and with that a reduction in stress. What does the MindGlow developer say about their mindfulness app? Written by Canadian developers ProjectOne Solutions based in Ontario, Quebec, the app uses Embarcadero’s RAD Studio Delphi and the cross-platform FireMonkey FMX framework to target Android mobile devices. ProjectOne says: “Some of the benefits of MindGlow are stress relief, relaxation, clarity, new ideas, new insights and emotional resilience. It even increases your HeartRateVariability for better physical health. Overall you’ll become more of your potential.“ They also say “MindGlow includes audio sequences for all the beneficial brain states – Alpha, Theta, Delta and Gamma. It also includes 9 levels of intensity – deepening your meditation for years to come“. ProjectOne also say that you need to be wearing headphones or ear-buds to use the app due to the way different audio needs to be delivered to each ear independtly. Website MindGlow Google Play MindGlow Screenshot Gallery

Read More

Extract, Transform, Load – The Magic Behind HeidiSQL

HeidiSQL is a wildly successful open source database management tool. Apart from being extremely useful in the management of MySQL, SQL Server, PostgreSQL and SQLite databases it is also open source – and that source code is written in Delphi. We’ve taken a brief overview of it before but that time we only scratched the surface of this wonderfully artful example of Delphi programming at its best. The code itself is packed with really great techniques. Let’s take a closer look at it. Things you will need to compile the HeidiSQL code You need RAD Studio Delphi 10.4 or higher.  I used Delphi 10.42. It’s easier if you have some form of Git source code control client installed.  I used my favorite GitHub Desktop client. The HeidiSQL source relies on two custom components – the source for them is included in the HeidiSQL source download. You should also download and install madExcept. Installing madExcept If you haven’t come across madExcept before you’re missing out! It’s a really great tool for intercepting and reporting on program exceptions which occur while your program is running. The website explains in more detail but I thoroughly recommend it. Go to http://www.madshi.net/madExceptDescription.htm Download and run the installer Make sure you check madExcept v5. The installer is a little bit confusing – click on version 5 and it will select it to be installed (the default is not to install version 4 or 5 which has confused me in the past!) When it’s properly installed there will be an extra menu item added to your RAD Studio tools menu Getting the HeidiSQL source code Head on over to the HeidiSQL site and click on the “download source” button. This will take you to the following link: https://github.com/HeidiSQL/HeidiSQL Installing the required third-party components HeidiSQL relies on two additional components. Note that both components are very popular so make sure you don’t already have them installed. If you don’t have them installed follow the instructions below. The required items are: SynEdit to provide a syntax-highlighted query editor area. VirtualTreeView to implement a number of very fast tree and listview style UI views. Installing SynEdit Navigate to the .HeidiSQLcomponentssyneditPackagesDelphi10.4SynEdit.groupproj project and load it. Right click and compile the SynEdit_R project and then right click and select “install” for the SynEdit_D design-time package. Installing VirtualTreeView Navigate to the .HeidiSQLcomponentsvirtualtreeviewpackagesDelphi10.4VirtualTrees.groupproj and load it. Right click and compile the VirtualTreesR runtime package.  Now right-click and select “install” for the VirtualTreesD design-time package. Compiling required resource (.res) files There’s a little bit of a gap in the steps I saw about compiling HeidiSQL from source code. There are a few .rc resource files for things like icons and fonts and there didn’t appear to be anywhere saying that they needed to be compiled. I may have missed them (I did try compiling the various group projects) in which case let me know in the comments and I’ll update this post with the correction – but until then do the following: Navigate to the .HeidiSQL root source folder. In there is a batch file called “build-res.bat” – run that file. It should complete without errors. Now navigate to the .HeidiSQLsourcevcl-styles-utils folder. In there is a file called “CompileResources.bat” Edit that file with a text editor and remove the paths at the start of the […]

Read More

Upscale Images With DeepAI’s Super Resolution API

DeepAI is very popular platform for artificial intelligence. They provide researches, guides, news and several AI APIs. You can learn more about their APIs from this link: https://deepai.org/apis The range and depth of the APIs offered by DeepAI is quite astounding. They include APIs which allow for image colorization, facial recognition, nudity detection, sentiment and emotion detection, text summarization, pose detection, text/caption generation, OCR, text to image, signature verification, toonify (to turn images into cartoon-like drawings), content moderation, anonymization and MANY more – the complete list is pretty staggering! Chances are DeepAI has something to satisfy your needs for addining and using artificial intelligence to your Windows, desktop and mobile apps. We’re going to focus on one API in particular – the Super Resolution API. What is Super Resolution API? In this article, we are going to implement the “Super Resolution API” using Delphi. This API uses machine learning to clean, sharp and upscale photos with out losing the original content. It can correct blurry images to some accepted level. This is not a simple mathematical algorithm to upscale image, but a machine learning which identify the content and make it better without losing original content. So it’s always better than an image processing application in your PC. How to get DeepAI API key? It’s easy to get the API key. You don’t need an Credit card. You will get $5 USD API credits free at registration which equivalent to 10,000 API requests. After that you can pay by $0.50 USD per 1000 requests. You can signup with google account or a regular signup. Then go to Dashboard and you can find the API key. You can use that key for any API. How to send a request to Super Resolution API from Delphi? There are two types of requests depending on, Send image as URL Send image as file Parameters are the same for both requests. api-key: API key as header parameter image: Image to process Code to send the API request using REST components are like this: RESTRequest.Params.Clear; RESTResponse.RootElement := ”; lparam := RESTRequest.Params.AddItem; lparam.name := ‘api-key’; lparam.Value := [YOUR API KEY]; lparam.ContentType := ctNone; lparam.Kind := pkHTTPHEADER; lparam.Options := [poDoNotEncode]; lparam := RESTRequest.Params.AddItem; lparam.name := ‘image’; lparam.Value := [PATH TO IMAGE]; lparam.ContentType := ctNone; lparam.Kind := pkFile; lparam.Options := [poDoNotEncode]; RESTRequest.Execute; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 RESTRequest.Params.Clear; RESTResponse.RootElement := ”; lparam := RESTRequest.Params.AddItem; lparam.name := ‘api-key’; lparam.Value := [YOUR API KEY]; lparam.ContentType := ctNone; lparam.Kind := pkHTTPHEADER; lparam.Options := [poDoNotEncode];   lparam := RESTRequest.Params.AddItem; lparam.name := ‘image’; lparam.Value := [PATH TO IMAGE]; lparam.ContentType := ctNone; lparam.Kind := pkFile; lparam.Options := [poDoNotEncode];   RESTRequest.Execute; You can send images in most of image file types, but the response always will be a JPG file. How to process the response from the Super Resolution API? If the request is success, you will get a response in JSON like this: { “id”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXX”, “output_url”: “https://api.deepai.org/job-view-file/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/outputs/output.jpg” } { “id”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXX”, “output_url”: “https://api.deepai.org/job-view-file/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/outputs/output.jpg” } ID is the unique id of your processed resource. “output_url” is the URL of your processed image. We can parse this JSON in Delphi like this and get the image as TPicture: jsonObj := RESTResponse.JSONValue as TJSONObject; MS := TMemoryStream.Create; http.Get(jsonObj.Values[‘output_url’].Value, MS); MS.Position := 0; Picture := […]

Read More

6 Ways To Rapidly Collect Massive Datasets in your Apps

What is web scraping? Web Scraping is a technique where a computer program extracts data from human-readable output coming from websites. The web scraping software may directly access the World Wide Web using the Hypertext Transfer Protocol or a web browser. While Web Scraping can be done manually by a software user, the term typically refers to automated processes implemented using a program, bot, or web crawler. It is a form of copying in which specific data is gathered and copied from the web, typically into a central local database, spreadsheet, API, or any format that is more useful for the user, for later retrieval or analysis. First, the app needs to interpret a web page as data Web pages are built using text-based mark-up languages; like HTML and XHTML, and frequently contain rich and useful data in text form. Quite obviously, most web pages are designed for human end-users and not really for ease of automated use. As a result, this can make it a challenging task to build specialized tools and software to facilitate the scraping of any web pages. Delphi plus Python is a powerful combination for web scraping In this tutorial, we’ll build Windows Apps with extensive Web Scraping capabilities by integrating Python’s Web Scraping libraries with Embarcadero’s Delphi, using Python4Delphi (P4D). P4D empowers Python users with Delphi’s award-winning VCL functionalities for Windows which enables us to build native Windows apps 5x faster. This integration enables us to create a modern GUI with Windows 10 looks and responsive controls for our Python Web Scraping applications. Python4Delphi also comes with an extensive range of demos, use cases, and tutorials. We’re going to cover the following… How to use Requests, BeautifulSoup, Instaloader, Snscrape, Tweepy, and Feedparser Python libraries to perform Web Scraping tasks All of them would be integrated with Python4Delphi to create Windows Apps with Web Scraping capabilities. Prerequisites Before we begin to work, download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out the easy instructions found in the Getting Started With Python4Delphi video by Jim McKeeth. Time to get started! First, open and run our Python GUI using project Demo1 from Python4Delphi with RAD Studio. Then insert the script into the lower Memo, click the Execute button, and get the result in the upper Memo. You can find the Demo1 source on GitHub. The behind the scene details of how Delphi manages to run your Python code in this amazing Python GUI can be found at this link. Open Demo01.dproj. How do I Scrape Website’s Data using Python Requests? “Requests” is a simple, yet elegant HTTP library. Requests allow you to execute standard HTTP requests extremely easily. Using this library, you can pass parameters to requests, add headers, receive and process responses, execute authenticated requests. Requests are ready for the demands of building robust and reliable HTTP–speaking applications, for the needs of today. Keep-Alive & Connection Pooling International Domains and URLs Sessions with Cookie Persistence Browser-style TLS/SSL Verification Basic & Digest Authentication Familiar dict–like Cookies Automatic Content Decompression and Decoding Multi-part File Uploads SOCKS Proxy Support Connection Timeouts Streaming Downloads Automatic honoring of .netrc Chunked HTTP Requests After installing Python4Delphi properly, you can get Requests using pip or easy install to your command prompt: […]

Read More

Detecting Objects on images using Google Cloud Vision API

Lets take a look at this image below. Let’s try to think about 2 or 3 objects we can see and focus on what calls our attention the most. If we write them down , lets see if Google can guess it right. Google’s cloud-based vision API – making sense of what we see and much more Google Cloud’s Vision API offers powerful pre-trained machine learning models that you can easily use on your desktop and mobile applications through REST or RPC API methods calls. Lets say you want your application to detect objects, locations, activities, animal species, and products. Or maybe you want not only to detect faces but also their emotion expressed on the faces. Or perhaps you have the need to read printed or handwritten text. All of this and much more is possible to be done for free (up to first 1000 units/month per feature) or at very affordable prices and it’s scalable too with no upfront commitments. Object localization The option for “Object Localization” is part of the Vision API that we can use to detect and extract information about multiple objects in an image. For each object detected the following elements are returned: A textual description – what is it, in plain human language? A confidence score – how certain is the API of what it has detected? And normalized vertices [0,1] for the bounding polygon around the object. Where are the objects on the image? Using RAD Studio Delphi to control the Google Cloud Vision API We can use RAD Studio and Delphi to easily setup its REST client library to take advantage of Google Cloud’s Vision API to empower our desktop and mobile applications and if the request is successful, the server returns a 200 OK HTTP status code and the response in JSON format. Our RAD Studio and Delphi applications will be able to either call the API and perform the detection on a local image file by sending the contents of the image file as a base64 encoded string in the body of the request or rather use an image file located in Google Cloud Storage or on the Web without the need to send the contents of the image file in the body of your request. How do I set up the Google Cloud Vision Object Localization API? Make sure you refer to Google Cloud Vision API documentation in the Object Localization section (https://cloud.google.com/vision/docs/object-localizer), but in general terms this is what you need to do on Google’s side: Visit https://cloud.google.com/vision and login with your Gmail account Create or select a Google Cloud Platform (GCP) project Enable the Vision API for that project Enable the Billing for that project Create a API Key credential How do I call Google Vision API Object Localization endpoint? Now all we need to do is to call the API URL via a HTTP POST method passing the request JSON body with type OBJECT_LOCALIZATION and source as the link to the image we want to analyze. One can do that using REST Client libraries available on several programming languages and a quick start guide is available on Google’s documentation (https://cloud.google.com/vision/docs/quickstart-client-libraries). Actually, at the bottom page of the Google Cloud Vision documentation Guide (https://cloud.google.com/vision/docs/object-localizer) there is an option “Try This API” which allows you to post […]

Read More

Automate Aircraft Workflow With Delphi And A Mobile Phone

If you’re like me flying is probably a slightly mystical experience. You’re not entirely sure how the plane defies gravity and the job of a pilot seems to involve a bewildering array of switches, dials and incredibly expensive sunglasses. There’s a lot more going on, of course, beyond the cockpit and safety briefings. Modern flights, even in smaller aircraft, involve much more tedious ephemera like equipment reservations, invoices, fees and the relentless recording of flight data. Making the process of flying less trying Belgian developers Micriconsult have poured their talent into a dedicated Android app specially for members of The Noordzee Vliegclub. Using RAD Studio Delphi and the Firemonkey FMX framework they have helped ease and automate some of the tasks of the flying business with some thoughtful and intelligent workflow analysis to create a really useful tool which pilots can simply carry around in their pocket – especially useful for smaller light-commercial and pleasure craft where space is at a premium. Noordzee Vliegclub Website What does the Noordzee Vliegclub app do? The app allows a member from the Noordzee Vliegclub to reserve a plane, to enter the flight data to help fulfil legal obligations as well as keep tabs on the myriad expenses of the modern world of flight. According to the developer, “It also keeps track of all flights and all costs involved, presented as monthly invoices. At any time a member can update its database data. This app allows a member from the Noordzee Vliegclub to reserve a plane and enter the flight data. At any time a member can update its database data. A flight instructor can define a plane as a training plane (preventing members to use it for regular flights), authorize a pilot member to fly on a specific plane type and keep track on the flying hours of each student. Users who are not a member of the Noordzee Vliegclub cannot use this app.” Google Play Noordzee Vliegclub Screenshot Gallery You could really make a difference – use your talent with RAD Studio today and be a high-flyer!

Read More

Developer Stories: Simon Hooper Recounts The Story of His Wise Eyes Application

Simon Hooper started programming with Delphi 26 years ago. He has recently submitted his application (Wise Eyes) at the Delphi 26th Showcase Challenge and he talked with us about his programming experiences. You can visit his Wise Eyes website for more information. When did you start using RAD Studio Delphi and have long have you been using it? Since Delphi 1.  Over 26 years ago! What was it like building software before you had RAD Studio Delphi? Delphi heralded a new generation of development tools.  When Microsoft only had buggy betas of Foxpro, Borland had a ground-breaking polished product. I had been recruited to rewrite an application that had “hit the buffers” in terms of GUI development using tools of DOS era origin.  My decision to use the brand new Delphi was applauded time and again.  We were working with multi-dimensional databases, writing GUIs with lots of drag and drop coupled to fast data handling.  I hardly touched a TDataset during my first 3 years with Delphi.  That changed! How did RAD Studio Delphi help you create your showcase application? We had much Delphi experience to leverage.  It is the complete development tool in one package.  Cross platform, data handling, GUI builder.  It’s well developed OO structure is vital to a large project.  With a project that is pushing boundaries we are able to build and integrate our own functions, components and tools when Delphi does not (yet) have them. What made RAD Studio Delphi stand out from other options? From a single tool with a common code base are delivering web server for Linux and Windows, and desktop for Windows and macOS. No reliance on Java, .Net, PHP interpreter or similar causing installation, compatibility and versioning headaches.  Native compile is simple, fast and keeps our IP secure. What made you happiest about working with RAD Studio Delphi? We were able to build a really solid structure, within which the wide functionality of the product is slotting in nicely.  A structure to edit and store report definitions though RTTI is infinitely extendable.   Interfaces enable any data source to be fed into the report generation engine.  Similarly interfaces on the output of the engine enable the same report to be rendered to browser, Excel, CSV or whatever.  Extensive use of records passed by pointer reduces the amount of copying, and by extension memory used. What have you been able to achieve through using RAD Studio Delphi to create your showcase application? My biggest grin came was when we load-tested the server module.  The minimum target for a viable product was 20 reports per minute per processor core.  100rpm/core would be “time for a beer” as my son put it.  The result: a staggering 300rpm/core!  Wise Eyes is fast because Delphi is fast. What are some future plans for your showcase application? Wise Eyes is just beginning.  Our Excel Inject is popular, but people are using Google Sheets and other online spreadsheets.  With the aforementioned structure existing code will extend quite easily. Multi-lingual capability is close, for which Delphi’s Unicode support is vital. The headline feature for version 2 will be easy drag and drop report writing for managers, without first building a datamart. Thank you, Simon! Visit the link below to view his showcase entry. Delphi is fast and reliable – […]

Read More

Delphi Versatility: FelixGO Workflow Logistics Android App

FelixGO is the smartphone version of Felix Tools from German-base Felix Systems Logistics Factory and it is built using RAD Studio Delphi and the versatile Firemonkey FMX cross-platform framework. According to the Felix Systems, “this app allows the creation of freight orders, transportation needs, on the basis of harvest declarations FHPDAT logistics standards. The system can be used on Android smartphones or tablets. The app is integrated into a logistics center and Felix automated master data provided. Create messages are transmitted to the Felix logistics center and processed by it.” As Felix quite rightly says, less paper equals more efficiency and that is what they are aiming for with this very nicely organized and engineered app. FelixTools and the Felix Go app collates all the data for the entire workflow process from the initial contract letters right through the billing cycle. Websites FelixGO Google Play FelixGO Screenshot Gallery You could harness the power of RAD Studio Delphi’s versatile development tools to help control your user’s workflow. Try RAD Studio today and see what it can do to increase efficiencies.

Read More

Cartoonify Photos With This Easy But Powerful Neural Network

Based on this wiki : a convolutional neural network (CNN, or ConvNet) is a class of deep neural network, most commonly applied to analyze visual imagery. They are also known as shift invariant or space invariant artificial neural networks (SIANN). Convolutional Neural Network? That sounds complicated! Is it? Good news,  DeepAI.org has provided an API to access, so we can quickly build applications using it. Follow along as we show you how.. How do I set up an app with DeepAI API? We can emulate what curl does for access to DeepAI API, because it looks quite straight-forward. curl -F ‘image=@/path/to/your/file.jpg’ -H ‘api-key:1ade887c-a8e2-4b91-b888-947aa67cde17’ https://api.deepai.org/api/toonify curl     –H span class=“s1”>‘api-key:1ade887c-a8e2-4b91-b888-947aa67cde17’/span>     https://api.deepai.org/api/toonify here what that looks like in Delphi code: procedure Toonify; var LRestClient: TRESTClient; LRestRequest: TRESTRequest; LImageDownload: TDownloadURL; LResponse: TJSONObject; begin LRestClient := TRESTClient.Create(TOONIFY_API_URL); LRestRequest:= TRESTRequest.Create(nil); try LRestRequest.Method := rmPOST; LRestRequest.AddParameter(‘api-key’, edtApiKey.Text, TRESTRequestParameterKind.pkHTTPHEADER, [poDoNotEncode]); LRestRequest.AddFile(‘image’, OriginalFilename); LRestRequest.Client := LRestClient; LRestRequest.Execute; LResponse := LRestRequest.Response.JSONValue as TJSONObject; // LReponse image url processing here .. finally LRestRequest.Free; LRestClient.Free; end; end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 procedure Toonify; var   LRestClient: TRESTClient;   LRestRequest: TRESTRequest;   LImageDownload: TDownloadURL;   LResponse: TJSONObject; begin   LRestClient := TRESTClient.Create(TOONIFY_API_URL);   LRestRequest:= TRESTRequest.Create(nil);   try     LRestRequest.Method := rmPOST;     LRestRequest.AddParameter(‘api-key’, edtApiKey.Text, TRESTRequestParameterKind.pkHTTPHEADER, [poDoNotEncode]);     LRestRequest.AddFile(‘image’, OriginalFilename);     LRestRequest.Client := LRestClient;     LRestRequest.Execute;     LResponse := LRestRequest.Response.JSONValue as TJSONObject;     // LReponse image url processing here ..   finally     LRestRequest.Free;     LRestClient.Free;   end; end; Using the API’s JSON output The above code is only accessing JSON result from Toonify API, which JSON result similar to the following: { “id”: “fcf837eb-640f-4f02-97e29ab02377”, “output_url”: “https://api.deepai.org/job-view-file/fcf837eb-ab02377/outputs/output.jpg”} {     “id”: “fcf837eb-640f-4f02-97e29ab02377”,     “output_url”: “https://api.deepai.org/job-view-file/fcf837eb-ab02377/outputs/output.jpg”} Converting the API output into something useful So, to download the image and then attach it to the component Timage as a result of the process, here is the code: var .. LMemStream: TMemoryStream; LBitmapItem: TFixedBitmapItem; .. begin .. LImageDownload := TDownloadURL.Create; LMemStream := TMemoryStream.Create(); try LImageDownload.DownloadRawBytes(LResponse.GetValue(‘output_url’).Value, LMemStream); LBitmapItem := Image2.MultiResBitmap.Add; LBitmapItem.Bitmap.LoadFromStream(LMemStream); except on E: Exception do ShowMessage(‘Error: ‘+E.Message); end; LImageDownload.Free; LMemStream.Free; .. end 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 var   ..   LMemStream: TMemoryStream;   LBitmapItem: TFixedBitmapItem;   .. begin   ..   LImageDownload := TDownloadURL.Create;   LMemStream := TMemoryStream.Create();   try    LImageDownload.DownloadRawBytes(LResponse.GetValue(‘output_url’).Value, LMemStream);    LBitmapItem := Image2.MultiResBitmap.Add;    LBitmapItem.Bitmap.LoadFromStream(LMemStream);   except on E: Exception do    ShowMessage(‘Error: ‘+E.Message);   end;   LImageDownload.Free;   LMemStream.Free;   .. end Full Delphi source code to cartoonify and image using the DeepAI API The full Tonify method is this: procedure TForm2.Toonify; var LRestClient: TRESTClient; LRestRequest: TRESTRequest; LImageDownload: TDownloadURL; LResponse: TJSONObject; LMemStream: TMemoryStream; LBitmapItem: TFixedBitmapItem; begin LRestClient := TRESTClient.Create(TOONIFY_API_URL); LRestRequest:= TRESTRequest.Create(nil); try LRestRequest.Method := rmPOST; LRestRequest.AddParameter(‘api-key’, edtApiKey.Text, TRESTRequestParameterKind.pkHTTPHEADER, [poDoNotEncode]); LRestRequest.AddFile(‘image’, OriginalFilename); LRestRequest.Client := LRestClient; LRestRequest.Execute; LResponse := LRestRequest.Response.JSONValue as TJSONObject; LImageDownload := TDownloadURL.Create; LMemStream := TMemoryStream.Create(); try LImageDownload.DownloadRawBytes(LResponse.GetValue(‘output_url’).Value, LMemStream); LBitmapItem := Image2.MultiResBitmap.Add; LBitmapItem.Bitmap.LoadFromStream(LMemStream); except on E: Exception do end; LImageDownload.Free; LMemStream.Free; finally LRestRequest.Free; LRestClient.Free; end; end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 procedure TForm2.Toonify; var   LRestClient: TRESTClient;   LRestRequest: TRESTRequest;   LImageDownload: TDownloadURL;   LResponse: TJSONObject;   LMemStream: TMemoryStream;   LBitmapItem: TFixedBitmapItem; begin   LRestClient := TRESTClient.Create(TOONIFY_API_URL);   LRestRequest:= TRESTRequest.Create(nil);   try     LRestRequest.Method := rmPOST;     LRestRequest.AddParameter(‘api-key’, edtApiKey.Text, TRESTRequestParameterKind.pkHTTPHEADER, [poDoNotEncode]);     LRestRequest.AddFile(‘image’, OriginalFilename);     LRestRequest.Client := LRestClient;     LRestRequest.Execute;     LResponse := LRestRequest.Response.JSONValue as TJSONObject;     LImageDownload := TDownloadURL.Create; […]

Read More

Developer Stories: Brian Thomson Shares Insights On His Pro Workout Application

Brian Thomson has been using Delphi since its 1.0. Brian submitted a showcase entry (Helpful Workout Application Is Delphi Powered) to the Delphi 26th Showcase Challenge and we interviewed him to learn more about his experiences with Delphi. You can find out more about his application and download it here on Pro Workout. When did you start using RAD Studio/Delphi and have long have you been using it?  I have been using Delphi since 1.0, and the predecessor (Object Pascal) for 5 years before then.  My entire career has been based around Delphi.  Delphi is still my favorite way to write programs. What was it like building software before you had RAD Studio/Delphi? The tools I was using before Delphi were completely non-visual.  We went through iteration after iteration just trying to get the screens to look right! How did RAD Studio Delphi help you create your showcase application? First, there are several aspects of multi-platform development that have been handled for me like a cross-platform-capable clipboard and file system utilities.  While writing my app there were a few items that I had to write for myself in a cross platform manner.  This made me appreciate what had been done for me all the more! What made RAD Studio Delphi stand out from other options? 1. It was already a tool that I was very familiar with. 2. The visual layout tools are FAR easier to use than the XML based setups other tools use. 3. The capability to write the app as a truly cross platform project meant that I could do rapid testing cycles on Windows before putting it out on mobile. What made you happiest about working with RAD Studio Delphi? For me there is no language that is easier to read than Delphi. The IDE is wonderful. The debugging tools on Windows are amazing. They still need to be brought up to that level on Android, but I expect they could get there. What have you been able to achieve through using RAD Studio Delphi to create your showcase application? One of the first issues I noticed was that a truly cross platform application needs to be ready for any resolution on any device.  As a single developer I decided that rather than creating many copies of each of my graphics in different sizes, that I would need to use vector graphics to enable me to define a graphic once, and resize it as needed.  Delphi gave me the ability to write a component that would do basic EPS graphics.  This increased my ability to incorporate graphics while lowering the weight of including the graphics. What are some future plans for your showcase application? My app is designed to help people do a better job when they workout.  As such I plan to set up a web-based infrastructure that will allow me to host workout programs, designed by professionals, which will then be able to be purchased by end users. Thanks Brian! You can take a look at his software’s showcase entry below. Showcase  

Read More