code: private ImageFormat getImageFormatForCode(String code) {
          if (code == null || imageFormats == null) {
              return null;
          }
          for (ImageFormat oneImageFormat : imageFormats) {
              if (code.equalsIgnoreCase(oneImageFormat.getCode())) {
                  return oneImageFormat;
              }
          }
          return null;
      }
docs: Retrieves the image format for the image format code.
  
  @param code
  Code.
  @return The {@link ImageFormat}, or null.