neester
asked on
Take Screenshot in C
Hey Guys,
Just a question.
I am about to start a new project where I hope to develop a program which will screenshot games as you play, and upload the image to a webserver.
Firstly - I need to know if C would be the best language to use?
How easy is it for C to take a screenshot and resize/convert it to a 600*480 JPG??
How easy is it to open a HTTP connection?
I can make a PHP script to accept a file upload - I just need to know how easy it is to actually upload the file...
I haven't done much on this level with C...
This question will probably end up with points being split.
So PLEASE even if someone has posted something GREAT.
Post too!
I will award anything useful!
Thanks people!
(btw, google is so hard, when searching for example "c" code. type: screenshot + c in goolge and you get 50,000 results that don't help)
Just a question.
I am about to start a new project where I hope to develop a program which will screenshot games as you play, and upload the image to a webserver.
Firstly - I need to know if C would be the best language to use?
How easy is it for C to take a screenshot and resize/convert it to a 600*480 JPG??
How easy is it to open a HTTP connection?
I can make a PHP script to accept a file upload - I just need to know how easy it is to actually upload the file...
I haven't done much on this level with C...
This question will probably end up with points being split.
So PLEASE even if someone has posted something GREAT.
Post too!
I will award anything useful!
Thanks people!
(btw, google is so hard, when searching for example "c" code. type: screenshot + c in goolge and you get 50,000 results that don't help)
ASKER
Hmm...
I would love to try it!
Any example code would be lovely!
At the moment, I use Pelles C and GCC to code.
What is a good program for C++??
I have MS Visual C++
From Vis Studio 6...
I would love to try it!
Any example code would be lovely!
At the moment, I use Pelles C and GCC to code.
What is a good program for C++??
I have MS Visual C++
From Vis Studio 6...
>How easy is it for C to take a screenshot and resize/convert it to a 600*480 JPG??
Not very sure about taking a screen shot ... you can take a look at ijg jpeg library for conversion part though ... I think ijg library has the conversion facility
>How easy is it to open a HTTP connection?
>I can make a PHP script to accept a file upload - I just need to know how easy it is to actually upload the file..
this should not be too difficult ... google for libcurl
Not very sure about taking a screen shot ... you can take a look at ijg jpeg library for conversion part though ... I think ijg library has the conversion facility
>How easy is it to open a HTTP connection?
>I can make a PHP script to accept a file upload - I just need to know how easy it is to actually upload the file..
this should not be too difficult ... google for libcurl
ASKER
Ahh curl,
Will that work on Windows.
I have used it with Perl and PHP before.
Never with C.
Like I said, I am pretty new to C here :S
I just want something thats ultra efficent.
It just needs to take a screenshot.
Slowly resize and compress the image - low cpu usage if possible,
then upload.
Needs to work on Windows.
Will that work on Windows.
I have used it with Perl and PHP before.
Never with C.
Like I said, I am pretty new to C here :S
I just want something thats ultra efficent.
It just needs to take a screenshot.
Slowly resize and compress the image - low cpu usage if possible,
then upload.
Needs to work on Windows.
ASKER
Yeah sunny i went there
http://curl.haxx.se/libcurl/c/
looks good!
BUT, where do i actually download it?
I found install instructions, but no download links?
Looks great though!
Definatly worth some points!!!
Now how do I take screenshots?
Thanks!
http://curl.haxx.se/libcurl/c/
looks good!
BUT, where do i actually download it?
I found install instructions, but no download links?
Looks great though!
Definatly worth some points!!!
Now how do I take screenshots?
Thanks!
ASKER
ahh found it!
ASKER
Ok I downloade CURL, it is an exe, not a normal .h header file.
See this: http://curl.haxx.se/lxr/source/docs/examples/simple.c
How do I compile that?
I am using Pelles C...
:D
See this: http://curl.haxx.se/lxr/source/docs/examples/simple.c
How do I compile that?
I am using Pelles C...
:D
If you downloaded source, compiling and installation instructions should be a part of it. Look for a file named README.txt or something similar.
I am not sure how you can take a screen shot from a program ... there are several tools to do this ... Also, for windows Ctrl+Print Scrn and Alt+Print Scrn work ... Dont know if windows provides some useful APIs for the same.
I am not sure how you can take a screen shot from a program ... there are several tools to do this ... Also, for windows Ctrl+Print Scrn and Alt+Print Scrn work ... Dont know if windows provides some useful APIs for the same.
ASKER
Ahh ok thanx sunny!
Maybe i should try C++??
I am a bit irritated with C's lack of string handling.
Makes life "seemingly unnecessaryly hard"...
Thanks for your input so far:)
Appreciate it very much!
Maybe i should try C++??
I am a bit irritated with C's lack of string handling.
Makes life "seemingly unnecessaryly hard"...
Thanks for your input so far:)
Appreciate it very much!
I will concede that C is not the best tool for this job ... C is better suited for system software, OS programming and other things where you need the control and flexibility that C offers.
ASKER
So your recommendation would be C++??
Thanks very much sunny!
probably saved me a lot of time and bother :D
Thanks very much sunny!
probably saved me a lot of time and bother :D
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot sunny!
It answered my questions!
:)
Another question.
I will accept your answer.
Are there many people who help in the C section?
I havent noticed many???
Thanks!
It answered my questions!
:)
Another question.
I will accept your answer.
Are there many people who help in the C section?
I havent noticed many???
Thanks!
There are many good experts in C section ... But all of them are not around all the time ... Also, as compared to some other TAs we are lot more friendly here ... We show each other mutual respect ... If one expert is handling the question satisfactorily, chances are no other expert is going to jump in with same/similar advise in hunt for points ... We are competitive but in a healthy collaborative way.
ASKER
Ahh ok :)
Sounds nice :D
WebDev section can get a bit cutthroat at times :)
hehe
Thanks again!
I will ask around the C++ section!
Sounds nice :D
WebDev section can get a bit cutthroat at times :)
hehe
Thanks again!
I will ask around the C++ section!
There are libraries available that can do this.
If you're into C++, that's probably a cleaner solution.
Kent