|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectEXIFUtilities
public class EXIFUtilities
Nested Class Summary | |
---|---|
static class |
EXIFUtilities.EXIFTagType
Deprecated. use EXIFTags#Type |
Field Summary | |
---|---|
static int |
TAG_COPYRIGHT
Deprecated. use EXIFTags.COPYRIGHT |
static int |
TAG_EXIF_IFD_POINTER
Deprecated. use EXIFTags.EXIF_IFD_POINTER |
static int |
TAG_USER_COMMENT
Deprecated. use EXIFTags.USER_COMMENT |
Constructor Summary | |
---|---|
EXIFUtilities()
|
Method Summary | |
---|---|
static int |
bytes2ToInt(byte[] buff,
int start,
boolean isBigEndian)
Simple utility methods returning an int built on top of 2 bytes, in compliance with the specified endianness |
static int |
bytes4ToInt(byte[] buff,
int start,
boolean isBigEndian)
Simple utility methods returning an int built on top of 4 bytes, in compliance with the specified endianness |
static TIFFTagWrapper |
createTag(int tagNumber)
|
static void |
insertEXIFintoStream(OutputStream outputStream,
byte[] imageData,
int imageDataSize,
EXIFMetadata exif)
This method allows to parse the provided EXIFMetadata object and put it into
the specified outputStream while copying back the JPEG encoded image referred by
the imageData argument. |
static byte[] |
intToBytes(int value)
Simple utility method returning a 2 bytes representation of a value as bigEndian |
static byte[] |
intToBytes(int value,
boolean isBigEndian)
Simple utility method returning a 2 bytes representation of a value, in compliance with the specified endianness |
static int |
locateFirst(byte[] buffer,
byte[] candidate)
Scan the input byte buffer, looking for a candidate bytes sequence and return the index of the first occurrence within the input buffer, or -1 in case nothing is found. |
static void |
replaceEXIFs(FileImageInputStreamExt inputStream,
EXIFMetadata exif)
Replace the EXIF contained within a file referred by a FileImageInputStreamExt instance
with the EXIF represented by the specified EXIFMetadata instance. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TAG_COPYRIGHT
EXIFTags.COPYRIGHT
public static final int TAG_EXIF_IFD_POINTER
EXIFTags.EXIF_IFD_POINTER
public static final int TAG_USER_COMMENT
EXIFTags.USER_COMMENT
Constructor Detail |
---|
public EXIFUtilities()
Method Detail |
---|
public static void insertEXIFintoStream(OutputStream outputStream, byte[] imageData, int imageDataSize, EXIFMetadata exif) throws IOException
EXIFMetadata
object and put it into
the specified outputStream while copying back the JPEG encoded image referred by
the imageData argument.
outputStream
- the stream where to writeimageData
- the bytes containing JPEG encoded image dataimageDataSize
- the number of bytes to be used from the data arrayexif
- the EXIFMetadata
object holding EXIF.
IOException
public static final byte[] intToBytes(int value, boolean isBigEndian)
value
- the value to be represented through 2 bytesisBigEndian
- true
in case of bigEndian
public static final byte[] intToBytes(int value)
value
- the value to be represented through 2 bytes
public static final int bytes2ToInt(byte[] buff, int start, boolean isBigEndian)
buff
- the buffer containing 2 bytes to be transformedstart
- the position within the buffer of the first byte to be transformedisBigEndian
- true
in case we need to encode it as bigEndian
public static final int bytes4ToInt(byte[] buff, int start, boolean isBigEndian)
buff
- the buffer containing 4 bytes to be transformedstart
- the position within the buffer of the first byte to be transformedisBigEndian
- true
in case we need to encode it as bigEndian
public static int locateFirst(byte[] buffer, byte[] candidate)
public static void replaceEXIFs(FileImageInputStreamExt inputStream, EXIFMetadata exif) throws IOException
FileImageInputStreamExt
instance
with the EXIF represented by the specified EXIFMetadata
instance. The original file
will be overwritten by the new one containing updated EXIF.
It is worth to point out that this replacing method won't currently perform any fields delete,
but simply content update. Therefore, tags in the original EXIF which are missing in the
updated EXIF parameter, won't be modified.
inputStream
- a FileImageInputStreamExt
referring to a JPEG containing EXIFexif
- the EXIFMetadata
instance containing tags to be updated
IOException
public static TIFFTagWrapper createTag(int tagNumber)
tagNumber
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |