Re: Processing PNG files... again..
On Oct 17, 11:37 am, kav...@gmail.com wrote:
> Ok guys..
>
> here's the code..
> Of course I'm getting an error in the function.. imageMalloc_8u_C1..
> cuz its not defined.. I'm not able to understand what its supposed to
> do.. any wud be appreciated.
>
> #include<iostream>
> #include<math.h>
> #include<string>
> #include<sstream>
> #include <fstream>
> #include <png.h>
> #include <zlib.h>
> using namespace std;
[snip]
Insert the usual remarks about this.
Get used to prepending std:: to standard stuff.
> byte* buffer= imageMalloc_8u_C1(width,height,&step);
[snip]
That sure looks like it ought to be allocating some
memory for you. Note that I didn't check if you are
then deallocating it someplace.
Since that's the only place in your code the name
appears, and it's not standard, you need to "round
up the usual suspects."
- Did you spell the function name correctly? Don't
forget upper/lower case have to match, and the
numeral 1 looks a lot like the letter l.
- Did you give it the right list of args?
- Did you include the right header file and library?
- Is it in a namespace?
Socks
|