|
| 1 | +# Aspose.Imaging.HEIC.Adapter for Java |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +**Aspose.Imaging.HEIC.Adapter for Java** is an extension for [Aspose.Imaging for Java](https://products.aspose.com/imaging/java/) providing support of [Openize.HEIC](https://github.com/openize-com/openize-heic-java/), this allows you to use the functions of both libraries as a single whole and expand export between formats. This adapter supports exporting HEIC to formats Png, Tiff, Pdf, Svg, Jpeg, Gif, Bmp, Emf, Wmf, J2k, Webp, [etc...](https://docs.aspose.com/imaging/java/supported-file-formats/) |
| 6 | + |
| 7 | +## Platform Dependence |
| 8 | + |
| 9 | +Aspose.Imaging.HEIC.Adapter for Java can be used to develop applications on Windows, Linux, macOS. The supported platforms include Java >= 1.8. |
| 10 | + |
| 11 | +## License |
| 12 | +The MIT License (MIT) |
| 13 | +More details here [LICENSE.txt](publish/LICENSE.txt) |
| 14 | + |
| 15 | +## Getting Started |
| 16 | + |
| 17 | +Are you ready to give Aspose.Imaging.HEIC.Adapter for Java a try? |
| 18 | + |
| 19 | +### **Installing from Maven Repository** |
| 20 | +Aspose hosts all Java APIs on [Maven repository](https://releases.aspose.com/java/repo/). |
| 21 | + |
| 22 | +**Specify Maven Repository Configuration** |
| 23 | +First you need to specify Aspose Maven Repository configuration / location in your Maven pom.xml as follows: |
| 24 | + |
| 25 | +``` xml |
| 26 | + |
| 27 | + <repositories> |
| 28 | + <repository> |
| 29 | + <id>AsposeJavaRepo</id> |
| 30 | + <name>Aspose Java Repository</name> |
| 31 | + <url>https://releases.aspose.com/java/repo/</url> |
| 32 | + </repository> |
| 33 | +</repositories> |
| 34 | + |
| 35 | +``` |
| 36 | + |
| 37 | +**Define Aspose.Imaging for Java API Dependency** |
| 38 | + |
| 39 | +Then define Aspose.Imaging for Java API dependency in your pom.xml as follows: |
| 40 | + |
| 41 | +``` xml |
| 42 | + |
| 43 | + <dependencies> |
| 44 | + <dependency> |
| 45 | + <groupId>com.aspose</groupId> |
| 46 | + <artifactId>aspose-imaging</artifactId> |
| 47 | + <version>25.4</version> |
| 48 | + </dependency> |
| 49 | + <dependency> |
| 50 | + <groupId>openize</groupId> |
| 51 | + <artifactId>openize-heic</artifactId> |
| 52 | + <version>25.4</version> |
| 53 | + </dependency> |
| 54 | + <dependency> |
| 55 | + <groupId>com.aspose</groupId> |
| 56 | + <artifactId>aspose-imaging-heic-adapter</artifactId> |
| 57 | + <version>25.4</version> |
| 58 | + </dependency> |
| 59 | + |
| 60 | + <!-- if you need a documentation, please add the following dependency. For example it could be useful for IDE. --> |
| 61 | + <dependency> |
| 62 | + <groupId>com.aspose</groupId> |
| 63 | + <artifactId>aspose-imaging</artifactId> |
| 64 | + <version>25.4</version> |
| 65 | + <classifier>javadoc</classifier> |
| 66 | + </dependency> |
| 67 | + <dependency> |
| 68 | + <groupId>com.aspose</groupId> |
| 69 | + <artifactId>aspose-imaging-heic-adapter</artifactId> |
| 70 | + <version>25.4</version> |
| 71 | + <classifier>javadoc</classifier> |
| 72 | + </dependency> |
| 73 | +</dependencies> |
| 74 | + |
| 75 | +``` |
| 76 | + |
| 77 | +After performing above steps, Aspose.Imaging for Java dependency will finally be defined in your Maven Project. |
| 78 | +Get more information here: |
| 79 | +[Java Image Processing Library or API can be installed through Maven.](https://docs.aspose.com/imaging/java/installation/) |
| 80 | + |
| 81 | + |
| 82 | +## Product dependencies |
| 83 | +This product is dependent on : |
| 84 | +- [Aspose.Imaging Java is distributed under Aspose EULA license](https://www.conholdate.app/viewer/view/my6hZebP2Hvz3brV/aspose_end-user-license-agreement_2023-11-20.pdf.pdf); |
| 85 | +- [Openize.HEIC is distributed under Openize.HEIC license](https://github.com/openize-heic/Openize.HEIC-for-Java/blob/main/LICENSE); |
| 86 | +- [Openize.IsoBmff that is distributed under MIT License](https://github.com/openize-heic/Openize.HEIC-for-Java/blob/main/Openize.IsoBmff/LICENSE). |
| 87 | + |
| 88 | +## Usage example |
| 89 | + |
| 90 | + |
| 91 | +### Export HEIC to Png |
| 92 | + |
| 93 | +```java |
| 94 | + |
| 95 | +import com.aspose.imaging.heic.adapter.*; |
| 96 | +import com.aspose.imaging.imageoptions.*; |
| 97 | + |
| 98 | +// You need this only once |
| 99 | +HEICImage.register(); |
| 100 | +try (Image image = com.aspose.imaging.Image.load("example.heic")) |
| 101 | +{ |
| 102 | + image.save("result.png"); |
| 103 | +} |
| 104 | +``` |
| 105 | + |
| 106 | +### Export HEIC to Jpg |
| 107 | + |
| 108 | +```java |
| 109 | +import com.aspose.imaging.heic.adapter.*; |
| 110 | +import com.aspose.imaging.imageoptions.*; |
| 111 | + |
| 112 | +// You need this only once |
| 113 | +HEICImage.register(); |
| 114 | +try (Image image = com.aspose.imaging.Image.load("example.heic")) |
| 115 | +{ |
| 116 | + image.save("result.jpg", new JpegOptions()); |
| 117 | +} |
| 118 | +``` |
| 119 | + |
| 120 | + |
| 121 | +### Export HEIC to Pdf |
| 122 | + |
| 123 | +```java |
| 124 | +import com.aspose.imaging.heic.adapter.*; |
| 125 | +import com.aspose.imaging.imageoptions.*; |
| 126 | + |
| 127 | +// You need this only once |
| 128 | +HEICImage.register(); |
| 129 | +try (Image image = com.aspose.imaging.Image.load("example.heic")) |
| 130 | +{ |
| 131 | + image.save("result.pdf", new PdfOptions()); |
| 132 | +} |
| 133 | +``` |
| 134 | + |
| 135 | + |
| 136 | +### Export HEIC to Tiff |
| 137 | + |
| 138 | +```java |
| 139 | +import com.aspose.imaging.heic.adapter.*; |
| 140 | +import com.aspose.imaging.imageoptions.*; |
| 141 | + |
| 142 | +// You need this only once |
| 143 | +HEICImage.register(); |
| 144 | +try (Image image = com.aspose.imaging.Image.load("example.heic", HEICLoadOptions.create())) |
| 145 | +{ |
| 146 | + image.save("result.tiff", new TiffOptions(TiffExpectedFormat.TiffJpegRgb)); |
| 147 | +} |
| 148 | +``` |
| 149 | + |
| 150 | +### Export HEIC to Svg |
| 151 | + |
| 152 | +```java |
| 153 | +import com.aspose.imaging.heic.adapter.*; |
| 154 | +import com.aspose.imaging.imageoptions.*; |
| 155 | + |
| 156 | +// You need this only once |
| 157 | +HEICImage.register(); |
| 158 | +try (Image image = com.aspose.imaging.Image.load("example.heic", HEICLoadOptions.create())) |
| 159 | +{ |
| 160 | + image.save("result.svg", new SvgOptions()); |
| 161 | +} |
| 162 | +``` |
0 commit comments