What I need is to create a new bitmap with a bigger height and same width of a bitmap file, paste the bitmap file contents inside the new one and write a string on the bottom of the bitmap file.
Image example of how it needs to be.
This is my current code, I dont know how to write on the bottom of the file / neither pasting the contents of the bitmap into another, thanks for the help!:
Bitmap bmp = new Bitmap(filePathSave);
RectangleF rectf = new RectangleF(0, 0, bmp.Width, bmp.Height);
Graphics g = Graphics.FromImage(bmp);
g.SmoothingMode = SmoothingMode.AntiAlias;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
StringFormat format = new StringFormat()
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center
};
g.DrawString("yourText", new Font("Tahoma", 20), Brushes.Black, rectf, format);
// Now save or use the bitmap
bmp.Save($"Temp/{Path.GetFileNameWithoutExtension(filePathSave)}_1.bmp", ImageFormat.Bmp);
// Flush all graphics changes to the bitmap
g.Flush();