class_docstr: Most basic decoder for the :class:`~ffcv.fields.RGBImageField`.
  
  It only supports dataset with constant image resolution and will simply read (potentially decompress) and pass the images as is.
class_docstr_tok: ["Most","basic","decoder","for","the",":","class",":","`","~ffcv.fields.RGBImageField","`",".","It","only","supports","dataset","with","constant","image","resolution","and","will","simply","read","(","potentially","decompress",")","and","pass","the","images","as","is","."]
code: def generate_code(self) -> Callable:
      mem_read = self.memory_read
      imdecode_c = Compiler.compile(imdecode)
  
      jpg = IMAGE_MODES["jpg"]
      raw = IMAGE_MODES["raw"]
      my_range = Compiler.get_iterator()
      my_memcpy = Compiler.compile(memcpy)
  
      def decode(batch_indices, destination, metadata, storage_state):
          for dst_ix in my_range(len(batch_indices)):
              source_ix = batch_indices[dst_ix]
              field = metadata[source_ix]
              image_data = mem_read(field["data_ptr"], storage_state)
              height, width = field["height"], field["width"]
  
              if field["mode"] == jpg:
                  imdecode_c(
                      image_data,
                      destination[dst_ix],
                      height,
                      width,
                      height,
                      width,
                      0,
                      0,
                      1,
                      1,
                      False,
                      False,
                  )
              else:
                  my_memcpy(image_data, destination[dst_ix])
  
          return destination[: len(batch_indices)]
  
      decode.is_parallel = True
      return decode
  
imports: from abc import ABCMeta, abstractmethod
  from dataclasses import replace
  from typing import Optional, Callable, TYPE_CHECKING, Tuple, Type
  import cv2
  import numpy
  from numba.typed import Dict
  from PIL.Image import Image
  from .base import Field, ARG_TYPE
  from ..pipeline.operation import Operation
  from ..pipeline.state import State
  from ..pipeline.compiler import Compiler
  from ..pipeline.allocation_query import AllocationQuery
  from ..libffcv import imdecode, memcpy, resize_crop
label_desc: Use image node_id 3 for calling the SimpleRGBImageDecoder obj's underlying member method code with example usage: obj.generate_code() and returns: decode, destination