Re: [Imtoolkit-users] segmentation fault by inFileReadImageData
Brought to you by:
scuri
From: Antonio S. <sc...@te...> - 2010-05-27 17:12:26
|
Hi, Your message did not get posted in the list because of the attachment. But they are very small, something is not right. I'll check this. About your problem, the data pointer must be allocated by the application. It will not be allocated by IM. So before imFileReadImageData, you can do: int size = imImageDataSize(width, height, color_mode, data_type); data = new unsigned char[size]; And at the end you should do: delete data; Best, Scuri From: phool preet [mailto:pho...@gm...] Sent: quinta-feira, 27 de maio de 2010 11:01 To: imt...@li... Subject: segmentation fault by inFileReadImageData hi.. i have installed im 3.6.1 on opensuse 11.0. i tried to run a simple program but got segmentation fault. it appears that function imFileReadImageData(image, data, 0, -1); is causing this because when u comment this function program just run fine. i tried to run a debugger gdb. i am attaching main program and a snapshot. i don't know what to do from here. any help will be appreciated |