Link to home
Start Free TrialLog in
Avatar of _faraz
_faraz

asked on

Using C or C++ library for server side rendering of images

I want to build a web application. Here's more or less what it will do:

1. Allow a user to select some info from a web page
2. send this to the server
3. based on this the server renders an image via a C library
4. sends back to client

It can be  Windows only - so we can use IIS

There's a few ways to go with this. PHP with SWIG binding to the C lib. An ASP component. Ch CGI binding to the C lib via the Ch SDK and the list could go on.

I know c++ and PHP best although I can also work in VB and ASP and other stuff too.

I need some architectural suggestions that solve binding the web service (PHP, ASP or whatever)  to the C library in an efficient way, and in a way I can get up and running quickly without too much weird stuff.

Looking for the best, clearest suggest and way forward - an example VC project would be great

further questions welcome.

Thanks

Avatar of jkr
jkr
Flag of Germany image

What kind of image based on what data do you want to create?
Do you know that you can generate images with PHP :

http://www.php.net/gd

? That's by far the simplest solution, especially since you already know PHP. And with this solution, you don't have to use C++.
Avatar of _faraz
_faraz

ASKER

The C library is my own and its generating a 3D image with OpenGL and several Gigabytes of data - the viewpoint is selected by the client and sent to the server.

Obviously the image has to be generated on the server rather than streaming the data down.

Avatar of _faraz

ASKER

So the key here is not the generation of the image, which has to be done in the C lib - the key is 1. how to interface this to a server-side web technology, 2. what are the benefits of the various options and 3. some suggestion of the most suitable solution ie if you think I should use an ASP component, please say why?

Thanks for your comments so far! Look forward to your suggestions
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _faraz

ASKER

Thanks Infinity

I just want to use the best solution and one which will be easy to deploy. I know enough ASP to work with it, but I agree that sticking to the technology you know best is usually the best way.  I'll take a look at your suggestion of writing a PHP extension over the next few days.

Still welcome any further suggestions.

thanks
Note that the gd library I mentioned earlier (http://www.php.net/gd) is also an extension to PHP, and yours will most likely be very similar (except that it will call your library).
Avatar of _faraz

ASKER

thanks for all your feedback, I've been side tracked onto something else at the moment but will respond next week.