Access image in pgie_pad_buffer_probe

I am looking at the sample deepstream-infer-tensor-meta-test.
Inside has

static GstPadProbeReturn
pgie_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * info, gpointer u_data)
{}

Is it possible to get image inside probing?
How can I do that?

You can refer to deepstream-image-meta-test/deepstream_image_meta_test.c::osd_sink_pad_buffer_probe for how to iterate through the user meta of type “NVDS_CROP_IMAGE_META” to find image crop meta and how to access it.
or you can refer to dsexample for how to save image.

Thanks. Using both pgie and sgie still not working. So I am going to crop images and interface to TRT program as sgie.