Skip to content

Commit 9dbbbef

Browse files
author
Evgeniy Sidenko
committed
## New features & enhancements in version 26.5.0:
- Added support for reading EXIF metadata. - Added support for tile mod HEIC files; - Added format check before load.
1 parent 586ea73 commit 9dbbbef

126 files changed

Lines changed: 9196 additions & 7619 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,27 @@ Openize.HEIC has support for:
1212
* HEIC coded static images;
1313
* I slices;
1414
* 4:2:0, 4:2:2 and 4:4:4 chroma subsampling.
15-
* HEIC coded animations that use several I slices;
15+
* HEIC coded animations that use several I-slices;
1616
* multiple images in a file;
1717
* alpha channels, depth maps, thumbnails, auxiliary images;
1818
* correct color transform according to embedded color profiles;
1919
* image transformations (crop, mirror, rotate), overlay images;
20-
* reading XML metadata.
20+
* reading XML metadata;
21+
* reading EXIF metadata.
2122

2223
Openize.HEIC doesn't support:
2324
* HDR images;
24-
* reading EXIF metadata;
2525
* color transform according to EXIF contained color profiles;
26-
* HEIC coded animations that use P and B slices;
26+
* HEIC coded animations that use P and B-slices;
2727
* deblocking filter.
2828

2929

30+
## New features & enhancements in version 26.5.0:
31+
32+
- Added support for reading EXIF metadata.
33+
- Added support for tile mod HEIC files;
34+
- Added format check before load.
35+
3036
## New features & enhancements in version 25.9.0:
3137

3238
- Added `ContentLightLevelInfo` box parsing;
@@ -146,6 +152,17 @@ try (IOFileStream fs = new IOFileStream("filename.heic", IOMode.READ))
146152
}
147153
```
148154

155+
### Read .heic file exif data
156+
```java
157+
import com.drew.metadata.exif.*;
158+
159+
try (IOFileStream fs = new IOFileStream("filename.heic", IOMode.READ))
160+
{
161+
HeicImage image = HeicImage.load(fs);
162+
Object xResolution = image.getExif().getExifRawData(ExifDirectoryType.ExifIfd0Directory, ExifIFD0Directory.TAG_X_RESOLUTION);
163+
}
164+
```
165+
149166
## Documentation
150167

151168
All public classes, methods and properties are documented in corresponding API_README:
@@ -178,9 +195,9 @@ Name | Type | Description
178195
#### Methods
179196
Name | Type | Description | Parameters
180197
------------ | ------------- | ------------- | -------------
181-
**getByteArray** | **byte[]** | Get pixel data in the format of byte array. Each three or four bytes (the count depends on the pixel format) refer to one pixel left to right top to bottom line by line. In general, it equals to `dstArray`. | `PixelFormat pixelFormat` - Pixel format that defines the order of colors and the presence of alpha byte. `Rectangle boundsRectangle` - Bounds of the requested area.<br/>`byte[] dstArray` - Byte array for storing the pixel values. If it is `null` or its length is less than necessary the new array will be allocated and returned.
182-
**getInt32Array** | **int[]** | Get pixel data in the format of integer array. Each int value refers to one pixel left to right top to bottom line by line. In general, it equals to `dstArray`. | `PixelFormat pixelFormat` - Pixel format that defines the order of colors. `Rectangle boundsRectangle` - Bounds of the requested area.<br/>`int[] dstArray` - Integer array for storing the argb values. If it is `null` or its length is less than necessary the new array will be allocated and returned.
183-
**getTextData** | **String** | Get frame text data. Exists only for mime frame types. |
198+
**getByteArray** | **byte[]** | Get pixel data in the format of byte array.<br />Each three or four bytes (the count depends on the pixel format) refer to one pixel left to right top to bottom line by line. In general, it equals to `dstArray`.<br />Returns null if frame does not contain image data. | `PixelFormat pixelFormat` - Pixel format that defines the order of colors and the presence of alpha byte.<br />`Rectangle boundsRectangle` - Bounds of the requested area.<br/>`byte[] dstArray` - Byte array for storing the pixel values. If it is `null` or its length is less than necessary the new array will be allocated and returned.
199+
**getInt32Array** | **int[]** | Get pixel data in the format of integer array. Each int value refers to one pixel left to right top to bottom line by line. In general, it equals to `dstArray`.<br />Returns null if frame does not contain image data. | `PixelFormat pixelFormat` - Pixel format that defines the order of colors.<br />`Rectangle boundsRectangle` - Bounds of the requested area.<br/>`int[] dstArray` - Integer array for storing the argb values. If it is `null` or its length is less than necessary the new array will be allocated and returned.
200+
**getTextData** | **String** | Get frame text data.<br />Exists only for mime frame types. |
184201
**toString** | **String** | Returns a string representation of the object. |
185202

186203
### Properties
@@ -190,23 +207,25 @@ Name | Type | Description
190207
**ImageType** | **ImageFrameType** | Type of an image frame content.
191208
**Width** | **long** | Width of the image frame in pixels.
192209
**Height** | **long** | Height of the image frame in pixels.
193-
**HasAlpha** | **boolean** | Indicates the presence of transparency of transparency layer. True if frame is linked with alpha data frame, false otherwise.
194-
**IsHidden** | **boolean** | Indicates the fact that frame is marked as hidden. True if frame is hidden, false otherwise.
195-
**IsImage** | **boolean** | Indicates the fact that frame contains image data. True if frame is image, false otherwise.
196-
**IsDerived** | **boolean** | Indicates the fact that frame contains image transform data and is inherited from another frame(-s). True if frame is derived, false otherwise.
210+
**HasAlpha** | **boolean** | Indicates the presence of transparency of transparency layer.<br />True if frame is linked with alpha data frame, false otherwise.
211+
**IsHidden** | **boolean** | Indicates the fact that frame is marked as hidden.<br />True if frame is hidden, false otherwise.
212+
**IsImage** | **boolean** | Indicates the fact that frame contains image data.<br />True if frame is image, false otherwise.
213+
**IsDerived** | **boolean** | Indicates the fact that frame contains image transform data and is inherited from another frame(-s).<br />True if frame is derived, false otherwise.
197214
**DerivativeType** | **BoxType** | Indicates the type of derivative content if the frame is derived.
198215
**AuxiliaryReferenceType** | **AuxiliaryReferenceType** | Indicates the type of auxiliary reference layer if the frame type is auxiliary.
199216
**NumberOfChannels** | **byte** | Number of channels with color data.
200217
**BitsPerChannel** | **byte[]** | Bits per channel with color data.
201218

202219
## License
203-
Openize.HEIC is available under [Openize License](https://github.com/openize-heic/Openize.HEIC-for-Java/blob/main/LICENSE).
220+
Openize.HEIC is available under [Openize License](LICENSE).
204221
> [!CAUTION]
205222
> Openize does not and cannot grant You a patent license for the utilization of HEVC/H.265 image compression/decompression technologies.
206223
207-
Openize.HEIC uses Openize.IsoBmff that is distributed under [MIT License](https://github.com/openize-heic/Openize.HEIC-for-Java/blob/main/licenses/Openize.IsoBmff/LICENSE).
224+
Openize.HEIC uses Openize.IsoBmff that is distributed under [MIT License](/Openize.IsoBmff/LICENSE).
225+
226+
Openize.HEIC uses [MetadataExtractor](https://github.com/drewnoakes/metadata-extractor) that is distributed under [Apache-2.0 license](https://github.com/drewnoakes/metadata-extractor?tab=Apache-2.0-1-ov-file#readme).
208227

209228
## OSS Notice
210-
Sample files used for tests and located in the "https://github.com/openize-heic/Openize.HEIC-for-Java/blob/main/Openize.Heic.Tests/TestsData/samples/nokia" folder belong to Nokia Technologies and are used according to [Nokia High-Efficiency Image File Format (HEIF) License](https://github.com/nokiatech/heif/blob/master/LICENSE.TXT)
229+
Sample files used for tests and located in the "./Openize.Heic.Tests/TestsData/samples/nokia" folder belong to Nokia Technologies and are used according to [Nokia High-Efficiency Image File Format (HEIF) License](https://github.com/nokiatech/heif/blob/master/LICENSE.TXT)
211230

212231
> Licensed Field means the non-commercial purposes of evaluation, testing and academic research in each non-commercial case to use, run, modify (in a way that still complies with the Specification) and copy the Software to (a) generate, using one or more encoded pictures as inputs, a file complying with the Specification and including the one or more encoded pictures that were given as inputs; and/or (b) read a file complying with the Specification, resulting into one or more encoded pictures included in the file as outputs.
Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
<a name="documentation-for-models"></a>
2-
## Documentation for Models
3-
4-
- [openize.heic.decoder.AuxiliaryReferenceType](AuxiliaryReferenceType.md)
5-
- [openize.heic.decoder.HeicHeader](HeicHeader.md)
6-
- [openize.heic.decoder.HeicImage](HeicImage.md)
7-
- [openize.heic.decoder.HeicImageFrame](HeicImageFrame.md)
8-
- [openize.heic.decoder.ImageFrameType](ImageFrameType.md)
9-
- [openize.heic.decoder.io.BitStreamWithNalSupport](BitStreamWithNalSupport.md)
10-
- [openize.heic.Decoder.PixelFormat](PixelFormat.md)
11-
- [openize.MathUtils](MathUtils.md)
12-
- [openize.io.IOSeekMode](IOSeekMode.md)
13-
- [openize.io.IOStream](IOStream.md)
14-
- [openize.io.IOMode](IOMode.md)
15-
- [openize.io.IOException](IOException.md)
1+
<a name="documentation-for-models"></a>
2+
## Documentation for Models
3+
4+
- [openize.heic.decoder.AuxiliaryReferenceType](AuxiliaryReferenceType.md)
5+
- [openize.heic.decoder.ExifData](ExifData.md)
6+
- [openize.heic.decoder.ExifDirectoryType](ExifDirectoryType.md)
7+
- [openize.heic.decoder.HeicHeader](HeicHeader.md)
8+
- [openize.heic.decoder.HeicImage](HeicImage.md)
9+
- [openize.heic.decoder.HeicImageFrame](HeicImageFrame.md)
10+
- [openize.heic.decoder.ImageFrameType](ImageFrameType.md)
11+
- [openize.heic.decoder.io.BitStreamWithNalSupport](BitStreamWithNalSupport.md)
12+
- [openize.heic.Decoder.PixelFormat](PixelFormat.md)
13+
- [openize.MathUtils](MathUtils.md)
14+
- [openize.io.IOSeekMode](IOSeekMode.md)
15+
- [openize.io.IOStream](IOStream.md)
16+
- [openize.io.IOMode](IOMode.md)
17+
- [openize.io.IOException](IOException.md)
1618
- [openize.io.IOFileStream](IOFileStream.md)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# openize.heic.decoder.ExifData
2+
3+
Exchangeable image file format class.
4+
Grants access to raw EXIF-data and to data by specific tags.
5+
6+
## Properties
7+
8+
Name | Type | Description | Notes
9+
------------ | ------------- | ------------- | -------------
10+
**DirectoriesList** | **List<com.drew.metadata.Directory>** | List of EXIF directories in frame. |
11+
**TagList** | **List<com.drew.metadata.Tag>** | List of all tags that present in directories. |
12+
**RawBytes** | **byte[]** | Raw EXIF data in bytes. |
13+
14+
## Constructors
15+
16+
Name | Description | Parameters
17+
------------ | ------------- | -------------
18+
**ExifData** | Create EXIF-data object. | **BitStreamWithNalSupport** <b>stream</b> - File stream.<br />**HeicImage** <b>image</b> - Parent heic image.<br />**HeicImageFrame** <b>exifFrame</b> - EXIF HEIC frame.
19+
20+
## Methods
21+
22+
Name | Type | Description | Parameters
23+
------------ | ------------- | ------------- | -------------
24+
**getExifRawData<T>** | **&lt;T&gt;** | Returns the string value for the particular tag type and the directory specified as a class. | **Class&lt;T&gt;** **dirType** - The directory class.<br/> int <b>tagType</b> - The tag type identifier. |
25+
**getExifRawData** | **Object** | Returns the raw value for the particular tag type and the directory specified as a class. | int <b>tagType</b> - The tag type identifier. |
26+
**getExifString&lt;T&gt;** | **String** | Returns the string value for the particular tag type and the directory specified as a parameter. | **Class&lt;T&gt;** **dirType** - The directory class.<br/>ExifDirectoryType <b>dirType</b> - The directory type identifier.<br />int <b>tagType</b> - The tag type identifier. |
27+
**getExifString** | **String** | Returns the string value for the particular tag type and the directory specified as a parameter. | ExifDirectoryType <b>dirType</b> - The directory type identifier.<br />int <b>tagType</b> - The tag type identifier. |
28+
29+
[[Back to API_README]](API_README.md)
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# openize.heic.decoder.ExifDirectoryType
2+
3+
Type of an EXIF directory.
4+
5+
## Enumeration
6+
7+
Name | Description
8+
------------ | -------------
9+
**ExifIfd0Directory** | IFD0 directory.
10+
**ExifImageDirectory** | One of several EXIF directories.<br />Holds information about image IFD's in a chain after the first.
11+
**ExifInteropDirectory** | EXIF interoperability tags directory.
12+
**ExifSubIfdDirectory** | SubIFD directory.
13+
**ExifThumbnailDirectory** | IFD1 directory. Holds information about an embedded thumbnail image.
14+
**GpsDirectory** | GPS EXIF tags directory.
15+
**AdobeJpegDirectory** | Directory for image encoding information for DCT filters, as stored by Adobe.
16+
**AppleMakernoteDirectory** | Directory for tags specific to Apple cameras.
17+
**AviDirectory** | Directory for basic metadata for Avi files.
18+
**BmpHeaderDirectory** | Directory for basic metadata for Bmp files.
19+
**CanonMakernoteDirectory** | Directory for tags specific to Canon cameras.
20+
**CasioType1MakernoteDirectory** | Directory for tags specific to Casio (type 1) cameras.
21+
**CasioType2MakernoteDirectory** | Directory for tags specific to Casio (type 2) cameras.
22+
**DjiMakernoteDirectory** | Directory for tags specific to DJI aircraft cameras.
23+
**DuckyDirectory** | Directory for tags from Photoshop "ducky" segments.
24+
**EpsDirectory** | Directory for basic metadata for EPS files.
25+
**ErrorDirectory** | Directory for the reporting of errors.
26+
**FileMetadataDirectory** | Directory for OS tags.
27+
**FileTypeDirectory** | Directory for tags derived from filename.
28+
**FlirCameraInfoDirectory** | Directory for camera info tags specific to FLIR cameras.
29+
**FlirHeaderDirectory** | Directory for header tags specific to FLIR cameras.
30+
**FlirMakernoteDirectory** | Directory for tags specific to FLIR cameras.
31+
**FlirRawDataDirectory** | Directory for raw tags specific to FLIR cameras.
32+
**FujifilmMakernoteDirectory** | Directory for tags specific to Fujifilm cameras.
33+
**GeoTiffDirectory** | Directory for tiff geo tags.
34+
**GifAnimationDirectory** | Directory for animation metadata for Gif files.
35+
**GifCommentDirectory** | Directory for comment metadata for Gif files.
36+
**GifControlDirectory** | Directory for control metadata for Gif files.
37+
**GifHeaderDirectory** | Directory for header metadata for Gif files.
38+
**GifImageDirectory** | Directory for basic metadata for Gif files.
39+
**HeicImagePropertiesDirectory** | Directory for basic metadata for Heic files.
40+
**HeicThumbnailDirectory** | Directory for basic metadata for Heic thumbnails.
41+
**HuffmanTablesDirectory** | Directory of tables for the DHT (Define Huffman Table(s)) segment.
42+
**IccDirectory** | Directory for basic metadata for Icc files.
43+
**IcoDirectory** | Directory for basic metadata for Ico files.
44+
**IptcDirectory** | Directory for tags used by the International Press Telecommunications Council (IPTC) metadata format.
45+
**JfifDirectory** | Directory for basic metadata for Jfif files.
46+
**JfxxDirectory** | Directory for basic metadata for Jfxx files.
47+
**JpegCommentDirectory** | Directory for comment metadata for Jpeg files.
48+
**JpegDirectory** | Directory for basic metadata for Jpeg files.
49+
**JpegDnlDirectory** | Directory for DNL metadata for Jpeg files.
50+
**KodakMakernoteDirectory** | Directory for tags specific to Kodak cameras.
51+
**KyoceraMakernoteDirectory** | Directory for tags specific to Kyocera cameras.
52+
**LeicaMakernoteDirectory** | Directory for tags specific to Leica cameras.
53+
**LeicaType5MakernoteDirectory** | Directory for tags specific to Leica (type 5) cameras.
54+
**Mp3Directory** | Directory for basic metadata for Mp3 files.
55+
**NetpbmHeaderDirectory** | Directory for header metadata for Netpbm files.
56+
**NikonPictureControl1Directory** | Directory for picture control tags specific to Nikon (type 1) cameras.
57+
**NikonPictureControl2Directory** | Directory for picture control tags specific to Nikon (type 1) cameras.
58+
**NikonType1MakernoteDirectory** | Directory for tags specific to Nikon (type 1) cameras.
59+
**NikonType2MakernoteDirectory** | Directory for tags specific to Nikon (type 1) cameras.
60+
**OlympusCameraSettingsMakernoteDirectory** | Directory for camera settings tags specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
61+
**OlympusEquipmentMakernoteDirectory** | Directory for equipment tags specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
62+
**OlympusFocusInfoMakernoteDirectory** | Directory for focus info tags specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
63+
**OlympusImageProcessingMakernoteDirectory** | Directory for image processing tags specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
64+
**OlympusMakernoteDirectory** | Directory for tags specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
65+
**OlympusRawDevelopment2MakernoteDirectory** | Directory for raw development 2 makernotes specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
66+
**OlympusRawDevelopmentMakernoteDirectory** | Directory for raw development 2 makernotes specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
67+
**OlympusRawInfoMakernoteDirectory** | Directory for raw info makernotes tags specific to Olympus cameras (Epson, Konica, Minolta and Agfa...).
68+
**PanasonicMakernoteDirectory** | Directory for tags specific to Panasonic cameras.
69+
**PanasonicRawDistortionDirectory** | Directory for raw distortion tags specific to Panasonic cameras.
70+
**PanasonicRawIfd0Directory** | Directory for raw Ifd0 tags specific to Panasonic cameras.
71+
**PanasonicRawWbInfo2Directory** | Directory for raw info tags specific to Panasonic cameras.
72+
**PanasonicRawWbInfoDirectory** | Directory for raw info tags specific to Panasonic cameras.
73+
**PcxDirectory** | Directory for basic metadata for Pcx files.
74+
**PentaxMakernoteDirectory** | Directory for tags specific to Pentax cameras.
75+
**PentaxType2MakernoteDirectory** | Directory for tags specific to Pentax (type 2) cameras.
76+
**PhotoshopDirectory** | Directory for the metadata found in the APPD segment of a JPEG file saved by Photoshop.
77+
**PngChromaticitiesDirectory** | Directory for chromaticities metadata for Png files.
78+
**PngDirectory** | Directory for basic metadata for Png files.
79+
**PrintIMDirectory** | Directory for Epson proprietary metadata.
80+
**PsdHeaderDirectory** | Directory for header metadata for Psd files.
81+
**QuickTimeFileTypeDirectory** | Directory for QuickTime file type metadata.
82+
**QuickTimeMetadataHeaderDirectory** | Directory for QuickTime metadata header tags.
83+
**QuickTimeMovieHeaderDirectory** | Directory for QuickTime movie header tags.
84+
**QuickTimeTrackHeaderDirectory** | Directory for QuickTime track header metadata.
85+
**ReconyxHyperFire2MakernoteDirectory** | Directory for tags specific to Reconyx HyperFire 2 cameras.
86+
**ReconyxHyperFireMakernoteDirectory** | Directory for tags specific to Reconyx HyperFire cameras.
87+
**ReconyxUltraFireMakernoteDirectory** | Directory for tags specific to Reconyx UltraFire cameras.
88+
**RicohMakernoteDirectory** | Directory for tags specific to Ricoh cameras.
89+
**SamsungType2MakernoteDirectory** | Directory for tags specific to certain 'newer' Samsung cameras.
90+
**SanyoMakernoteDirectory** | Directory for tags specific to Sanyo cameras.
91+
**SigmaMakernoteDirectory** | Directory for tags specific to Sigma cameras.
92+
**SonyType1MakernoteDirectory** | Directory for tags specific to Sony (type 1) cameras.
93+
**SonyType6MakernoteDirectory** | Directory for tags specific to Sony (type 6) cameras.
94+
**TgaDeveloperDirectory** | Directory for developer metadata for Tga files.
95+
**TgaExtensionDirectory** | Directory for extention metadata for Tga files.
96+
**TgaHeaderDirectory** | Directory for header metadata for Tga files.
97+
**WavFactDirectory** | Directory for fact metadata for Wav files.
98+
**WavFormatDirectory** | Directory for format metadata for Wav files.
99+
**WebPDirectory** | Directory for basic metadata for WebP files.
100+
**XmpDirectory** | Directory for basic metadata for Xmp files.
101+
**Undefined** | Undefined directory.
102+
103+
[[Back to API_README]](API_README.md)

0 commit comments

Comments
 (0)