hello
I'm a newer, and want to ask some simple problem.
When I debug in the code, such as file magick/constitute.c, line 579, (image=(Image *) (GetImageDecoder(magick_info))(read_info,exception);), this line read the pixel into the variable(image), but I can't step into it, and don't know how does it do that and I even don't know where to watch each pixel data.
Then when I do some work to my image, also I can't find the exact code to process the pixel of the image.
I don't know whether this part is not opensourse or I didn't get the right method? Can you tell me how to solve it?
Thanks!
Some problem about debug into IM
Re: Some problem about debug into IM
GetImageDecoder() returns the decoder for a particular image format. If your image is JPEG, for example, it calls the ReadJPEGImage() method located in coders/jpeg.c.
Re: Some problem about debug into IM
Thank you!magick wrote:GetImageDecoder() returns the decoder for a particular image format. If your image is JPEG, for example, it calls the ReadJPEGImage() method located in coders/jpeg.c.
But I also want to know how can I step into ReadJPEGImage(), and when I debug IM, where can I watch the exact pixels of my image (in which variable)?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Some problem about debug into IM
ReadJPEGImage() will be calling a external library.
Also debugging a coder is more difficult as it is a 'module'. That is the function is not loaded until it is actually required for the first time. IM does this so that if a user does not need a JPEG image IM does not have a hard-coded dependency on the external JPEG library.
It should be posible to debug a runtime loaded module, but I have never done so, so I am not certain how it is done.
Also debugging a coder is more difficult as it is a 'module'. That is the function is not loaded until it is actually required for the first time. IM does this so that if a user does not need a JPEG image IM does not have a hard-coded dependency on the external JPEG library.
It should be posible to debug a runtime loaded module, but I have never done so, so I am not certain how it is done.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/