Enum Class ExcelPictureType

java.lang.Object
java.lang.Enum<ExcelPictureType>
org.miaixz.bus.office.excel.shape.ExcelPictureType
All Implemented Interfaces:
Serializable, Comparable<ExcelPictureType>, Constable

public enum ExcelPictureType extends Enum<ExcelPictureType>
Excel支持的图片类型枚举
Since:
Java 17+
Author:
Kimi Liu
See Also:
  • Workbook.PICTURE_TYPE_EMF
  • Workbook.PICTURE_TYPE_WMF
  • Workbook.PICTURE_TYPE_PICT
  • Workbook.PICTURE_TYPE_JPEG
  • Workbook.PICTURE_TYPE_PNG
  • Workbook.PICTURE_TYPE_DIB
  • Enum Constant Details

  • Method Details

    • values

      public static ExcelPictureType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ExcelPictureType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getType

      public static ExcelPictureType getType(File imgFile)
      获取图片类型
      Parameters:
      imgFile - 图片文件
      Returns:
      图片类型,默认PNG
    • getValue

      public int getValue()
      获取类型编码
      Returns:
      编码