public final class ImageTypeDetector extends Object
Modifier and Type | Method and Description |
---|---|
static ImageType |
detectImageType(byte[] source)
Detect image type by magic bytes given the byte array source
|
static ImageType |
detectImageType(URL source)
Detect image type by magic bytes given the source URL
|
public static ImageType detectImageType(byte[] source)
source
- image bytes
ImageType
. Returns ImageType.NONE
if image type is unknown
public static ImageType detectImageType(URL source)
source
- image URL
ImageType
. Returns ImageType.NONE
if image type is unknown
Copyright © 1998–2021 iText Group NV. All rights reserved.