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 extension.static ImageFormatOpenImage.detectFormatFromMagic(byte[] bytes) Detect image format from magic bytes (first few bytes of the payload).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 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 pixel layout to suit the target format (e.g. drop alpha for JPEG).static voidOpenImage.convert(Path input, Path output, ImageFormat format) Quick format conversion. | 快速格式转换。Image.format(ImageFormat format) Set image format 设置图片格式static ImageImage.fromRaster(Raster raster, ImageFormat format) voidImage.save(Path path, ImageFormat format) Save to path with explicit format. | 以指定格式保存到路径。Image.toBase64(ImageFormat format) Encode to Base64 with explicit format. | 以指定格式编码为 Base64。byte[]Image.toBytes(ImageFormat format) Encode to bytes with explicit format. | 以指定格式编码为字节。static byte[]OpenImage.toBytes(Raster raster, ImageFormat format) Encode aRasterto a fresh byte array.static voidOpenImage.write(Raster raster, OutputStream out, ImageFormat format) Encode aRasterto an output stream in the given format.static voidOpenImage.write(Raster raster, Path path, ImageFormat format) Encode aRasterand write it to a path with the given format.voidImage.writeTo(OutputStream out, ImageFormat format) Write to output stream with explicit format. | 以指定格式写入输出流。Constructors in cloud.opencode.base.image with parameters of type ImageFormatModifierConstructorDescriptionImage(Raster raster, ImageFormat format) Create image wrapper with explicit 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.responsive
Methods in cloud.opencode.base.image.responsive that return ImageFormatModifier and TypeMethodDescriptionResponsiveBuilder.GenerateResult.format()Returns the value of theformatrecord component.Methods in cloud.opencode.base.image.responsive with parameters of type ImageFormatModifier and TypeMethodDescriptionResponsiveBuilder.BatchBuilder.formats(ImageFormat... formats) Set the output formats.ResponsiveBuilder.formats(ImageFormat... formats) Set the output formats.Constructors in cloud.opencode.base.image.responsive with parameters of type ImageFormatModifierConstructorDescriptionGenerateResult(Path path, ResponsiveBuilder.Variant variant, ImageFormat format, long fileSize) Compact constructor with validation. -
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 生成带新格式的安全输出路径voidSafeImageService.save(Raster raster, Path path, ImageFormat format, Path baseDir) Save raster safely with explicit format 以指定格式安全保存 raster -
Uses of ImageFormat in cloud.opencode.base.image.thumbnail
Methods in cloud.opencode.base.image.thumbnail with parameters of type ImageFormat -
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