C TGA files
The way to the input file TGA (i)
The way to the output file TGA (o)
The path to the letter folder (f)
The example:
$ ./meme generator img1.tga out.tga font
If the program does not have all three parameters on the entrance, write the line with the message "Wrong parameters" and complete the program with the code 1.2ndThe program also read i from the TGA input file.If there is an error when downloading, take the line with the message "Could not load image" and leave the program with the code 1.ThreeThe program downloads 26 TGA images from the font folder (f), one for each symbol of the big English alphabet.The files are called A.tga, B.tga, C.tga, etc.and d.(see thethe folder with fonts in the template (template.tar)If there is an error when you download the font, the program will complete the work with code 1.4 .The program then leads a line from the input, which will contain two numbers (top and bottom), divided by a gap.top indicates how many lines of text to be displayed at the top of the image, and bottom indicates how many lines of text to be displayed at the bottom of the image.The program then leads from the top + bottom text lines that are gradually drawn into the input TGA image.The string can only contain the English alphabet's string and text letters and spaces, the rest of the symbols are ignored.Conversion of English alphabet string letters to pre-rendering letters (the available font contains only pre-rendering letters).Each line may contain no more than 100 characters (including a new line symbol).and 5.The program negates the loaded lines in the input image (top lines in the top and bottom lines in the bottom).The style of rendering depends on you, but try to follow the example as accurately as possible.6 .Save the edited TGA input image on the disk in the TGA format on the path specified in the command line parameters.When you write the TGA output file, you get the title of the original input file!It will be much easier than trying to restore the right headline manually.You have a simple template that contains the code to download a TGA image from a script, a font folder and two images to test your program.The code example does not include error checking!You need to add it to the code yourself.Commentary
The use of VLA is prohibited.When performing the task, determine your own data types accordingly, for example, to display the TGA image in memory so that you can work well with the images.Also create a TGA image processing set of features so that you don’t have all the code in the main feature.You do not need to support black and white TGA images or transparent TGA images (RGBA).For this task, we assume that all TGA images have a 24-bit color depth (RGB) and that their coordinate system begins in the top left corner (i.e.and e.No 5 bit is permitted in the descriptor or the value of the start/setting in the headline).You will face memory errors when working with lines or pixels.Use the Address Sanitizer.It will be very useful to use the VSCode debuger to solve this task.Even when downloading/step mode, you can redirect the file to the program input so that you don’t have to record the input manually all the time.By the upper and lower values, calculate the positions in which separate lines of text should be placed, and then apply them to the TGA input image.Individual images of the TGA font symbols contain a black background (RGB (0, 0, 0)) and a white front plan.When copying the symbol into the input picture pixel, ignore the black background pixel and thus copy only the black pixels.Otherwise, you will have a distractive black rectangle around each symbol on the resulting image.Assume that the height of each symbol in the font is 34 pixels (see:code in the template), the width of each symbol is different.When drawing it is necessary to take into account the width of the drawn symbols so that the individual symbols are not covered.Leave a comment in the code.
Applications 1
Current freelance projects in the category C & C++
Reverse engineering of console utilities for querying SSD controllers (Flash ID)1. Purpose of the work Extraction of the application programming interface (API) for interaction with SSD/NVMe controllers from the provided set of console utilities (Phison, Silicon Motion, Realtek, Maxiotek, Marvell, JMicron, etc.). The result should be working code in C/C++… C & C++, Desktop Apps ∙ 3 days 22 hours back ∙ 5 proposals |
Development of a Minecraft Java Seed Map / Seed Viewer for the websiteDevelopment of Minecraft Java Seed Map / Seed Viewer for the websiteProject Description A browser-based tool Minecraft Java Seed Map / Seed Viewer needs to be developed, which will work on our website and allow the user to enter a seed from Minecraft Java Edition and view an… C & C++, HTML & CSS ∙ 4 days 5 hours back ∙ 14 proposals |
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x)
22 USD
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x) on the identical hardware platform (ESP32 + SX1268, 2W) based on the criteria of range, throughput, link stability, and power consumption. Conduct tests with… C & C++, C# ∙ 8 days 12 hours back ∙ 2 proposals |
Consultation and audit of the current project on Odoo 19 Community EditionWe are looking for an Odoo Developer — a solo developer with experience in Odoo 19 Community Edition, including using Claude Code. We need a specialist who has successfully implemented projects in Odoo and practical experience in development using Claude Code. Important: we only… C & C++, Javascript and Typescript ∙ 11 days 13 hours back ∙ 8 proposals |
Software development for Arduino (RF modules 3–7.5 GHz, automatic frequency scanning)It is necessary to develop a system on Arduino for the automatic search of active analog video signals and the automatic tuning of the transmitter to the detected frequency.It is planned to use three separate transceiver modules: 3000–4200 MHz; 4900–6000 MHz; 6100–7500… C & C++, Embedded Systems & Microcontrollers ∙ 12 days 14 hours back ∙ 5 proposals |