class_docstr: A subclass of :class:`~ffcv.fields.Field` supporting RGB image data.
  
  Parameters
  ----------
  write_mode : str, optional
      How to write the image data to the dataset file. Should be either 'raw'
      (``uint8`` pixel values), 'jpg' (compress to JPEG format), 'smart'
      (decide between saving pixel values and JPEG compressing based on image
      size), and 'proportion' (JPEG compress a random subset of the data with
      size specified by the ``compress_probability`` argument). By default: 'raw'.
  max_resolution : int, optional
      If specified, will resize images to have maximum side length equal to
      this value before saving, by default None
  smart_threshold : int, optional
      When `write_mode='smart`, will compress an image if it would take more than `smart_threshold` times to use RAW instead of jpeg.
  jpeg_quality : int, optional
      The quality parameter for JPEG encoding (ignored for
      ``write_mode='raw'``), by default 90
  compress_probability : float, optional
      Ignored unless ``write_mode='proportion'``; in the latter case it is the
      probability with which image is JPEG-compressed, by default 0.5.
class_docstr_tok: ["A","subclass","of",":","class",":","`","~ffcv.fields.Field","`","supporting","RGB","image","data",".","Parameters","--","--","--","--","--","write_mode",":","str",",","optional","How","to","write","the","image","data","to","the","dataset","file",".","Should","be","either","'raw'","(","``","uint8","``","pixel","values",")",",","'jpg","'","(","compress","to","JPEG","format",")",",","'smart'","(","decide","between","saving","pixel","values","and","JPEG","compressing","based","on","image","size",")",",","and","'proportion","'","(","JPEG","compress","a","random","subset","of","the","data","with","size","specified","by","the","``","compress_probability","``","argument",")",".","By","default",":","'raw","'",".","max_resolution",":","int",",","optional","If","specified",",","will","resize","images","to","have","maximum","side","length","equal","to","this","value","before","saving",",","by","default","None","smart_threshold",":","int",",","optional","When","`","write_mode='smart","`",",","will","compress","an","image","if","it","would","take","more","than","`","smart_threshold","`","times","to","use","RAW","instead","of","jpeg",".","jpeg_quality",":","int",",","optional","The","quality","parameter","for","JPEG","encoding","(","ignored","for","``","write_mode='raw","'","``",")",",","by","default","90","compress_probability",":","float",",","optional","Ignored","unless","``","write_mode='proportion","'","``",";","in","the","latter","case","it","is","the","probability","with","which","image","is","JPEG-compressed",",","by","default","0.5","."]
code: def get_decoder_class(self) -> Type[Operation]:
      return SimpleRGBImageDecoder
  
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 RGBImageField obj's underlying member method code with example usage: obj.get_decoder_class() and returns: SimpleRGBImageDecoder