C# Resizing image padded with image reflection

Completado Publicado hace 5 años Pagado a la entrega
Completado Pagado a la entrega

Dear C# experts,

Resizing image with aspect-ratio maintained and padded with image reflection on sides.

Please refer to the attachments.

"[login to view URL]" is the input.

With the following code, the resized output image is "[login to view URL]"

int width = 192; int height = 192;

Bitmap outbmp = new Bitmap(width, height);

//Bitmap inpbmp = new Bitmap(source);

using (Graphics gfx = [login to view URL](outbmp))

{

using (SolidBrush brush = new SolidBrush([login to view URL]))

{

[login to view URL](brush, 0, 0, width, height);

}

float scale = [login to view URL]((float)width / (float)[login to view URL], (float)height / (float)[login to view URL]);

var scaleWidth = (int)([login to view URL] * scale);

var scaleHeight = (int)([login to view URL] * scale);

[login to view URL](source, ((int)width - scaleWidth) / 2, ((int)height - scaleHeight) / 2, scaleWidth, scaleHeight);

}

You can see the image is resized and placed in the middle. But there is black padding on both sides. Instead of the black padding on the both side of the image, I want the same image to be reflected. For extra clarity on the reflecting, please refer to the this image "[login to view URL]"

The expected image is shown in this image "[login to view URL]"

Least computation requirements with fast execution time is also expected from your code.

Happy Bidding. If you need further clarification, please let me know.

Programación en C#

Nº del proyecto: #18064111

Sobre el proyecto

3 propuestas Proyecto remoto Activo hace 5 años

Adjudicado a:

vano101

Hello I have almost 9 years of experience with C#, Windows Forms and Microsoft .NET Framework. Also, I have extensive experience with image manipulation, including resizing, rotation and Bicubic interpolation

$25 USD en 1 día
(611 comentarios)
7.1

3 freelancers están ofertando un promedio de $33 por este trabajo

vpr58e3445e03cda

We have gone through the requirements that you have mentioned and we will help you in this. Message us for further discussion. Feel Free to contact us. Thank you!

$50 USD en 1 día
(3 comentarios)
1.5
sujon214

sir, I had 5 years experience on e programming task. so you can hire me. Thanks

$25 USD en 3 días
(0 comentarios)
0.0