Convert a C++/C# example to C (draws a 32bit RGB image)

Slutfört Publicerat 7 år sedan Betalades vid leverans
Slutfört Betalades vid leverans

Hello! I need you to convert an existing C++ (or it might be C#?) example code to C.

It's fairly straightforward and I'm probably about to overexplain it, but better than not enough detail!

All it does is generate an image - the image is of a circle, colored with the HSL (Hue/Saturation/Luminance) color space.

You can see THE IMAGE IT CREATES here:

[login to view URL]

(The Hue value is across all 360 degrees to show all colors, the Luminance value goes from 255=white in the middle to 0=black on the outside/rim, and Saturation is fixed but variable - set at 100% in that image).

The SOURCE CODE is attached as a .txt file, and also here:

[login to view URL]

I'm not necessarily after an exact translation, just the functionality - all I need from you is a .c file that i can compile to a lib with gcc to call one function, basically something like this:

int RenderImage(*imagebuffer32, int width, int height, float saturation) // 1=Success

*imagebuffer32 is the address of the image buffer to draw on - supplied by the caller who creates the image.

The image is always 32bit, so there's no need to cater for 24bit or end-of-row padding (and this makes it easier and more efficient to quickly write 32bit RGBA values).

Saturation is 0.0 to 1.0 (it's 1.0 in the previous example image).

Width and height will always be the same (it will always be a perfect square), best size is probably 512x512.

C-programmering C#-programmering C++-programmering Datagrafik

Projekt-id: #13432915

About the project

10 offerter Distansprojekt Aktivt 7 år sedan

Tilldelades:

Jupiter33

I am an expert programmer with several years of experience in the realization of software applications in C/C++ . It is quite clear the work you need. I think I can realize it within three days without difficulties. Mer

$45 USD inom 3 dagar
(37 omdömen)
5.3

10 frilansare har lagt bud på i genomsnitt $166 för det här jobbet

vano101

Hello. I have much experience in converting code from one programming language to another programming language. This sample is written on really C#, not C++. I know all three language very well: C++, C# and C. Also, I Mer

$53 USD inom 2 dagar
(1702 omdömen)
7.9
LiangXiaoJin

Dear client, how are you? I am a C/C++ programmer and mathematician. Checked your C# code carefully. What do you want clear? I think the pure C code is difficult for this task. If you want converting C# into C++, Mer

$700 USD inom 7 dagar
(78 omdömen)
7.4
freelancerLatino

Hello, I love C and C++ since more than 20 years ago ... I should be a good option. Please, let me know if the output should be generated in a .bmp file? or on screen.?. Best regards!

$100 USD inom 3 dagar
(135 omdömen)
7.4
kjg197318

Hello How are you? I have read the project description and txt file. I am sure I can do your requirement with pure c code at high level as a image processing expert. Please contact me and let's discuss in more deta Mer

$246 USD inom 3 dagar
(75 omdömen)
7.2
hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ Mer

$150 USD inom 3 dagar
(153 omdömen)
7.0
martinrisa1

Hi, I am professional freelancer and student of theoretic informatics, I have several experience with C++/C# and C programming also I am experienced in graphics. I can start the development right now and deliver the pr Mer

$100 USD inom 1 dag
(9 omdömen)
3.6
EmanAbdelmohsenM

Hi, It would be a pleasure if you accept me to do this job. I have drawn shapes using C language before, so it would be easy to draw images. I can deliver you a clean code. I can make the .c file with functions so t Mer

$55 USD inom 7 dagar
(0 omdömen)
0.0
CProger

Hello. Im a novice freelancer. I looked yor code and picture. Your code is c#. I can do it for a three days.

$111 USD inom 10 dagar
(0 omdömen)
0.0