Imageloader, How to convert Image to PImage?

Hello,
I am trying to Load images from data folder with string on by one with 2 seconds of displaying time, and get pixel brightness value from these images.

What I have:

String path = sketchPath("data");
ImageLoader loader;
ImageList list;
Image img;
PImage terrain;
+other data

void setup(){
  loader = new FileImageLoader(this);
  list = loader.start(path);
  img = list.getRandom();
+other data

  void update1(){
      if (img == null) {
    img = list.getRandom();
(error line)    terrain = loadImage(list, "jpg");
    color c = terrain.get(int(p.x), int(p.y));
+other data

error: The method loadImage(String, String) in the type PApplet is not applicable for the arguments (ImageList, String)

Are there any other ways to get pixel data from images called with string? Or how to fix this problem?
Thanks in advance.

please repair your code posting using the

</> code tag

looks like

```
type or paste code here
```

and please post a running code! ( MCVE )

and make sure you show us the used / imported library?
( also possibly a link to, where the example you used for it, comes from )