Uses of Enum Class
cloud.opencode.base.image.ImageFormat
Packages that use ImageFormat
Package
Description
-
Uses of ImageFormat in cloud.opencode.base.image
Subclasses with type arguments of type ImageFormat in cloud.opencode.base.imageMethods in cloud.opencode.base.image that return ImageFormatModifier and TypeMethodDescriptionstatic ImageFormatOpenImage.detectFormat(Path path) Detect format from file path 从文件路径检测格式ImageInfo.format()Returns the value of theformatrecord component.static ImageFormatImageFormat.fromExtension(String extension) Get format from file extension 从文件扩展名获取格式static ImageFormatImageFormat.fromMimeType(String mimeType) Get format from MIME type 从MIME类型获取格式Image.getFormat()Get the image format 获取图片格式static ImageFormatReturns the enum constant of this class with the specified name.static ImageFormat[]ImageFormat.values()Returns an array containing the constants of this enum class, in the order they are declared.Methods in cloud.opencode.base.image with parameters of type ImageFormatModifier and TypeMethodDescriptionImage.convert(ImageFormat targetFormat) Convert to specified format 转换到指定格式static voidOpenImage.convert(Path input, Path output, ImageFormat format) Quick format conversion 快速格式转换Image.format(ImageFormat format) Set the image format 设置图片格式voidImage.save(Path path, ImageFormat format) Save to path with format 保存到路径(指定格式)Image.toBase64(ImageFormat format) Convert to Base64 string with format 转换为Base64字符串(指定格式)byte[]Image.toBytes(ImageFormat format) Convert to byte array with format 转换为字节数组(指定格式)static byte[]OpenImage.toBytes(BufferedImage image, ImageFormat format) Convert image to byte array 将图片转换为字节数组static voidOpenImage.write(BufferedImage image, OutputStream out, ImageFormat format) Write image to output stream 写入图片到输出流static voidOpenImage.write(BufferedImage image, Path path, ImageFormat format) Write image to path with format 写入图片到路径(指定格式)voidImage.writeTo(OutputStream out, ImageFormat format) Write to output stream with format 写入输出流(指定格式)Constructors in cloud.opencode.base.image with parameters of type ImageFormatModifierConstructorDescriptionImage(BufferedImage image, ImageFormat format) Create image wrapper with format 创建带格式的图片包装器ImageInfo(int width, int height, ImageFormat format) Create image info with dimensions and format 使用尺寸和格式创建图片信息ImageInfo(int width, int height, ImageFormat format, long fileSize) Creates an instance of aImageInforecord class. -
Uses of ImageFormat in cloud.opencode.base.image.security
Methods in cloud.opencode.base.image.security that return ImageFormatMethods in cloud.opencode.base.image.security with parameters of type ImageFormatModifier and TypeMethodDescriptionstatic PathSafePathUtil.generateOutputPath(Path inputPath, ImageFormat format) Generate safe output path with new format 生成带新格式的安全输出路径 -
Uses of ImageFormat in cloud.opencode.base.image.thumbnail
Methods in cloud.opencode.base.image.thumbnail with parameters of type ImageFormatModifier and TypeMethodDescriptionThumbnailBuilder.format(ImageFormat format) Set output format 设置输出格式 -
Uses of ImageFormat in cloud.opencode.base.image.validation
Methods in cloud.opencode.base.image.validation that return ImageFormatModifier and TypeMethodDescriptionstatic ImageFormatImageValidator.detectFormat(byte[] bytes) Deprecated.Methods in cloud.opencode.base.image.validation that return types with arguments of type ImageFormatModifier and TypeMethodDescriptionstatic Optional<ImageFormat> ImageValidator.detectFormatOptional(byte[] bytes) Detect format from magic number (null-safe) 从魔数检测格式(空值安全)
ImageValidator.detectFormatOptional(byte[])for null-safe detection