C# Resizing image padded with image reflection

Fertiggestellt Veröffentlicht vor 5 Jahren Bezahlt bei Lieferung
Fertiggestellt Bezahlt bei Lieferung

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.

C# Programmierung

Projekt-ID: #18064111

Über das Projekt

3 Vorschläge Remote Projekt Aktiv vor 5 Jahren

Vergeben an:

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 in 1 Tag
(611 Bewertungen)
7.1

3 Freelancer bieten im Durchschnitt $33 für diesen Job

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 in 1 Tag
(3 Bewertungen)
1.5
sujon214

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

$25 USD in 3 Tagen
(0 Bewertungen)
0.0