A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/lanthale/LibHeifFX below:

lanthale/LibHeifFX: This installs the native lib libheif as a JavaFX Image format provider similar to imageIO before on Swing

Integration of Libheif (https://github.com/strukturag/libheif) library for JavaFX for all major operating systems (Linux, Windows, OSX). All flavoris of heif formats can be loaded with the Image class and manipulated by Pixelwriter/Pixelreader. Limitation is that the image class only supports 8-bit color deph but converts all 16bit image format to 8bit automatically.

JDK 24 and JavaFX 24 is required for v1.2.7 because of the foreign linker API usage and important changes (Windows) for threading happenend in Panama in JDK21

JDK 18 is required for v1.1.9 because of the foreign linker API usage and the big changes for threading happenend in Panama in JDK18

Now the lib is in release status. That means it is tested on OSX, Windows, Ubuntu 20.4 under different threading scenarious.

Supported OS:

I have integrated Libheif 1.12.0 (https://github.com/strukturag/libheif/releases/tag/v1.12.0)

Point to the maven coordinates:

JDK18

<dependency>  
    <groupId>org.libheiffx</groupId>    
    <artifactId>LibHeifFX</artifactId>  
    <version>1.1.9</version>  
</dependency>  

JDK24

<dependency>  
    <groupId>org.libheiffx</groupId>    
    <artifactId>LibHeifFX</artifactId>  
    <version>1.2.7</version>  
</dependency>  
--add-modules jdk.incubator.foreign --enable-native-access=org.libheiffx  
--add-exports=javafx.graphics/com.sun.javafx.iio=org.libheiffx 
--add-exports=javafx.graphics/com.sun.javafx.iio.common=org.libheiffx
--enable-preview
--enable-native-access=org.libheiffx
--add-exports=javafx.graphics/com.sun.javafx.iio=org.libheiffx 
--add-exports=javafx.graphics/com.sun.javafx.iio.common=org.libheiffx

You can have a look into the class TestAPP.java to see how to use it, but generally just create an Image with the URL/stream and add it to the image view:

  Image img=new Image(initialFile.toURI().toURL().toString(), false);  
  ImageView view = new ImageView();  
  view.setFitHeight(200);  
  view.setFitWidth(200);  
  view.setPreserveRatio(true);  
  stack.getChildren().add(view);  
  view.setImage(img);

You can also use the lib without adding the file handler. What I mean is that you can also forget the "...install" line and just load a file URL with the lib (see the TestApp.java to see how it works).

Steps to create your own build:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3