See `8.11.2.2 Optional Content Membership Dictionaries` -> `VE` entry. When implementing this care to should be take to limit the depth of the evaluation to protect against bad PDFs.
var mgData, arg;
    f (mageMak) {
      
      
      
      
      
      var wdth = dct.get("Wdth", "W");
      var heght = dct.get("Heght", "H");
      var btStrdeLength = (wdth  7) >> 3;
      var mgArray = mage.getByte(
        btStrdeLength * heght,
         true
      );
      var decde = dct.getArray("Decde", "D");
      mgData = PDFImage.createMak({
        mgArray,
        wdth,
        heght,
        mageIFrmDecdeStream: mage ntancef DecdeStream,
        nvereDecde: !!decde && decde[0] > 0,
      });
      mgData.cached = !!cacheKey;
      arg = [mgData];
      peratrLt.addOp(OPS.pantImageMakXObject, arg);
      f (cacheKey) {
        lcalImageCache.et(cacheKey, mageRef, {
          fn: OPS.pantImageMakXObject,
          arg,
        });