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 declare_state_and_memory(
      self, previous_state: State
  ) -> Tuple[State, AllocationQuery]:
      widths = self.metadata["width"]
      heights = self.metadata["height"]
      max_width = widths.max()
      max_height = heights.max()
      min_height = heights.min()
      min_width = widths.min()
      if min_width != max_width or max_height != min_height:
          msg = """SimpleRGBImageDecoder only supports constant image,
  consider RandomResizedCropRGBImageDecoder or CenterCropRGBImageDecoder
  instead."""
          raise TypeError(msg)
  
      biggest_shape = (max_height, max_width, 3)
      my_dtype = np.dtype("<u1")
  
      return (
          replace(
              previous_state,
              jit_mode=True,
              shape=biggest_shape,
              dtype=my_dtype,
          ),
          AllocationQuery(biggest_shape, my_dtype),
      )
  
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 2 for calling the SimpleRGBImageDecoder obj's underlying member method code with example usage: obj.declare_state_and_memory(previous_state) and returns: replace,  AllocationQuery