code: def get_image_ext(image):
      if image.shape[2] == 4:
          return ".png"
      return ".jpg"
  
file_path: PaddleHub/modules/image/text_recognition/chinese_ocr_db_crnn_server/utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import base64
  import math
  from io import BytesIO
  import cv2
  import numpy
  from PIL import Image
  from PIL import ImageDraw
  from PIL import ImageFont
label_desc: Use image node_id 5 for calling a global function with example usage: get_image_ext(image) and returns: str, str