I would like to take an image and add a border at the top of the image (BMP). From what I researched I need
But I've never worked with an image in C #: (
Example: This image
Tostaythatway
I was able to solve this problem by concatenating two images.
Image principal = Image.FromFile(@"ImagemPrincipal.jpg");
Image logo = Image.FromFile(@"ImagemHeader.jpg");
int imagemSaida_Width = principal.Width;
int imagemSaida_Height = principal.Height + logo.Height;
var imagemSaida = new Bitmap(imagemSaida_Width, imagemSaida_Height);
using (principal)
{
using (imagemSaida)
{
using (var canvas = Graphics.FromImage(imagemSaida))
{
canvas.InterpolationMode = InterpolationMode.HighQualityBicubic;
// Definir plano de funda do arquivo de saida como Branco
canvas.Clear(Color.White);
// Adicionar o logo no arquivo de saida
canvas.DrawImage(logo, 0, 0);
// Adidionar principal no arquivo de saida
canvas.DrawImage(exame, 0, logo.Height);
canvas.Save();
}
imagemSaida.Save("ImagePrincipalComLogo.jpg");
}
}
Hello, would you just change the sizes of the border's px no?!
border-image-width: 10px 10px 10px 10px;
(top) (right) (bottom) (left)