diff --git a/README.md b/README.md index d31a43a..0611308 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ You must add `--enable-native-access=ALL-UNNAMED` to your JVM runtime arguments. about "Restricted methods". In the future, the JVM will throw an error if you don't explicitly include this flag. As the project uses the Java FFM API, and Markdown comments, your target must also be JDK 23+. Bindings are currently -generated from libvips `8.18.0` (but should be safe to use with different minor or patch versions). +generated from libvips `8.18.2` (but should be safe to use with different minor or patch versions). > [!NOTE] > This library **does not** include `libvips` in the download, you must add it to the system/container you're building diff --git a/core/src/main/java/app/photofox/vipsffm/VImage.java b/core/src/main/java/app/photofox/vipsffm/VImage.java index b5fc436..29edf9f 100644 --- a/core/src/main/java/app/photofox/vipsffm/VImage.java +++ b/core/src/main/java/app/photofox/vipsffm/VImage.java @@ -9586,13 +9586,15 @@ public static VImage uhdrloadSource(Arena arena, VSource source, VipsOption... a /// If the image is scRGB and has a gainmap, a base image will be computed /// and it will be saved as UltraHDR. /// - /// If the image is scRGB and has no gainmap, one will be computed. + /// If the image is scRGB and has no gainmap, one will be computed at a + /// `gainmap_scale_factor` of the base image. /// This is slow and takes a lot of memory. /// /// See also: `Image.write_to_file`, [VImage#uhdrload] /// @param filename Filename to save to /// @param args Array of VipsOption to apply to this operation /// @optionalArg Q [VipsOption.Int] Q factor + /// @optionalArg gainmap-scale-factor [VipsOption.Int] The scale factor of base image to gainmap image /// @optionalArg keep [VipsOption.Int] Which metadata to retain /// @optionalArg background [VipsOption.ArrayDouble] Background value /// @optionalArg page-height [VipsOption.Int] Set page height for multipage save @@ -9612,6 +9614,7 @@ public void uhdrsave(String filename, VipsOption... args) throws VipsError { /// See also: [VImage#uhdrsave], `Image.write_to_file` /// @param args Array of VipsOption to apply to this operation /// @optionalArg Q [VipsOption.Int] Q factor + /// @optionalArg gainmap-scale-factor [VipsOption.Int] The scale factor of base image to gainmap image /// @optionalArg keep [VipsOption.Int] Which metadata to retain /// @optionalArg background [VipsOption.ArrayDouble] Background value /// @optionalArg page-height [VipsOption.Int] Set page height for multipage save @@ -9633,6 +9636,7 @@ public VBlob uhdrsaveBuffer(VipsOption... args) throws VipsError { /// @param target Target to save to /// @param args Array of VipsOption to apply to this operation /// @optionalArg Q [VipsOption.Int] Q factor + /// @optionalArg gainmap-scale-factor [VipsOption.Int] The scale factor of base image to gainmap image /// @optionalArg keep [VipsOption.Int] Which metadata to retain /// @optionalArg background [VipsOption.ArrayDouble] Background value /// @optionalArg page-height [VipsOption.Int] Set page height for multipage save diff --git a/core/src/main/java/app/photofox/vipsffm/jextract/VipsRaw.java b/core/src/main/java/app/photofox/vipsffm/jextract/VipsRaw.java index 5203cc2..31231ac 100644 --- a/core/src/main/java/app/photofox/vipsffm/jextract/VipsRaw.java +++ b/core/src/main/java/app/photofox/vipsffm/jextract/VipsRaw.java @@ -15489,25 +15489,25 @@ public static int VIPS_SBUF_BUFFER_SIZE() { } /** * {@snippet lang=c : - * #define VIPS_VERSION "8.18.0" + * #define VIPS_VERSION "8.18.2" * } */ public static MemorySegment VIPS_VERSION() { class Holder { static final MemorySegment VIPS_VERSION - = VipsRaw.LIBRARY_ARENA.allocateFrom("8.18.0"); + = VipsRaw.LIBRARY_ARENA.allocateFrom("8.18.2"); } return Holder.VIPS_VERSION; } /** * {@snippet lang=c : - * #define VIPS_VERSION_STRING "8.18.0" + * #define VIPS_VERSION_STRING "8.18.2" * } */ public static MemorySegment VIPS_VERSION_STRING() { class Holder { static final MemorySegment VIPS_VERSION_STRING - = VipsRaw.LIBRARY_ARENA.allocateFrom("8.18.0"); + = VipsRaw.LIBRARY_ARENA.allocateFrom("8.18.2"); } return Holder.VIPS_VERSION_STRING; } @@ -15529,10 +15529,10 @@ public static int VIPS_MAJOR_VERSION() { public static int VIPS_MINOR_VERSION() { return VIPS_MINOR_VERSION; } - private static final int VIPS_MICRO_VERSION = (int)0L; + private static final int VIPS_MICRO_VERSION = (int)2L; /** * {@snippet lang=c : - * #define VIPS_MICRO_VERSION 0 + * #define VIPS_MICRO_VERSION 2 * } */ public static int VIPS_MICRO_VERSION() { @@ -15547,10 +15547,10 @@ public static int VIPS_MICRO_VERSION() { public static int VIPS_LIBRARY_CURRENT() { return VIPS_LIBRARY_CURRENT; } - private static final int VIPS_LIBRARY_REVISION = (int)0L; + private static final int VIPS_LIBRARY_REVISION = (int)2L; /** * {@snippet lang=c : - * #define VIPS_LIBRARY_REVISION 0 + * #define VIPS_LIBRARY_REVISION 2 * } */ public static int VIPS_LIBRARY_REVISION() { diff --git a/docs/app.photofox.vipsffm/app/photofox/vipsffm/VImage.html b/docs/app.photofox.vipsffm/app/photofox/vipsffm/VImage.html index 8b195ef..fe6a111 100644 --- a/docs/app.photofox.vipsffm/app/photofox/vipsffm/VImage.html +++ b/docs/app.photofox.vipsffm/app/photofox/vipsffm/VImage.html @@ -12073,7 +12073,8 @@

uhdrsave

gainmap recomputation.

If the image is scRGB and has a gainmap, a base image will be computed and it will be saved as UltraHDR.

-

If the image is scRGB and has no gainmap, one will be computed. +

If the image is scRGB and has no gainmap, one will be computed at a +gainmap_scale_factor of the base image. This is slow and takes a lot of memory.

See also: Image.write_to_file, uhdrload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)

@@ -12084,7 +12085,7 @@

uhdrsave

Throws:
VipsError
Optional arguments:
-
Q VipsOption.Int Q factor, keep VipsOption.Int Which metadata to retain, background VipsOption.ArrayDouble Background value, page-height VipsOption.Int Set page height for multipage save, profile VipsOption.String Filename of ICC profile to embed, strip VipsOption.Boolean Strip all metadata from image
+
Q VipsOption.Int Q factor, gainmap-scale-factor VipsOption.Int The scale factor of base image to gainmap image, keep VipsOption.Int Which metadata to retain, background VipsOption.ArrayDouble Background value, page-height VipsOption.Int Set page height for multipage save, profile VipsOption.String Filename of ICC profile to embed, strip VipsOption.Boolean Strip all metadata from image
@@ -12104,7 +12105,7 @@

uhdrsaveBuffer

Throws:
VipsError
Optional arguments:
-
Q VipsOption.Int Q factor, keep VipsOption.Int Which metadata to retain, background VipsOption.ArrayDouble Background value, page-height VipsOption.Int Set page height for multipage save, profile VipsOption.String Filename of ICC profile to embed, strip VipsOption.Boolean Strip all metadata from image
+
Q VipsOption.Int Q factor, gainmap-scale-factor VipsOption.Int The scale factor of base image to gainmap image, keep VipsOption.Int Which metadata to retain, background VipsOption.ArrayDouble Background value, page-height VipsOption.Int Set page height for multipage save, profile VipsOption.String Filename of ICC profile to embed, strip VipsOption.Boolean Strip all metadata from image
@@ -12126,7 +12127,7 @@

uhdrsaveTarget

Throws:
VipsError
Optional arguments:
-
Q VipsOption.Int Q factor, keep VipsOption.Int Which metadata to retain, background VipsOption.ArrayDouble Background value, page-height VipsOption.Int Set page height for multipage save, profile VipsOption.String Filename of ICC profile to embed, strip VipsOption.Boolean Strip all metadata from image
+
Q VipsOption.Int Q factor, gainmap-scale-factor VipsOption.Int The scale factor of base image to gainmap image, keep VipsOption.Int Which metadata to retain, background VipsOption.ArrayDouble Background value, page-height VipsOption.Int Set page height for multipage save, profile VipsOption.String Filename of ICC profile to embed, strip VipsOption.Boolean Strip all metadata from image
diff --git a/docs/app.photofox.vipsffm/app/photofox/vipsffm/jextract/VipsRaw.html b/docs/app.photofox.vipsffm/app/photofox/vipsffm/jextract/VipsRaw.html index 0660a57..27c9d0c 100644 --- a/docs/app.photofox.vipsffm/app/photofox/vipsffm/jextract/VipsRaw.html +++ b/docs/app.photofox.vipsffm/app/photofox/vipsffm/jextract/VipsRaw.html @@ -11383,7 +11383,7 @@

Method Summary

-
#define VIPS_LIBRARY_REVISION 0
+
#define VIPS_LIBRARY_REVISION 2
 
@@ -11803,7 +11803,7 @@

Method Summary

-
#define VIPS_MICRO_VERSION 0
+
#define VIPS_MICRO_VERSION 2
 
@@ -15171,7 +15171,7 @@

Method Summary

-
#define VIPS_VERSION "8.18.0"
+
#define VIPS_VERSION "8.18.2"
 
@@ -15191,7 +15191,7 @@

Method Summary

-
#define VIPS_VERSION_STRING "8.18.0"
+
#define VIPS_VERSION_STRING "8.18.2"
 
@@ -32895,7 +32895,7 @@

VIPS_VERSION

public static MemorySegment VIPS_VERSION()
-
#define VIPS_VERSION "8.18.0"
+
#define VIPS_VERSION "8.18.2"
 
@@ -32909,7 +32909,7 @@

VIPS_VERSION_STRING

public static MemorySegment VIPS_VERSION_STRING()
-
#define VIPS_VERSION_STRING "8.18.0"
+
#define VIPS_VERSION_STRING "8.18.2"
 
@@ -32951,7 +32951,7 @@

VIPS_MICRO_VERSION

public static int VIPS_MICRO_VERSION()
-
#define VIPS_MICRO_VERSION 0
+
#define VIPS_MICRO_VERSION 2
 
@@ -32979,7 +32979,7 @@

VIPS_LIBRARY_REVISION

public static int VIPS_LIBRARY_REVISION()
-
#define VIPS_LIBRARY_REVISION 0
+
#define VIPS_LIBRARY_REVISION 2
 
diff --git a/docs/index-all.html b/docs/index-all.html index 388daad..83779a2 100644 --- a/docs/index-all.html +++ b/docs/index-all.html @@ -19152,7 +19152,7 @@

V

-
#define VIPS_LIBRARY_REVISION 0
+
#define VIPS_LIBRARY_REVISION 2
 
@@ -19530,7 +19530,7 @@

V

-
#define VIPS_MICRO_VERSION 0
+
#define VIPS_MICRO_VERSION 2
 
@@ -22533,7 +22533,7 @@

V

-
#define VIPS_VERSION "8.18.0"
+
#define VIPS_VERSION "8.18.2"
 
@@ -22551,7 +22551,7 @@

V

-
#define VIPS_VERSION_STRING "8.18.0"
+
#define VIPS_VERSION_STRING "8.18.2"
 
diff --git a/docs/index.html b/docs/index.html index 51b9e3e..eca2b06 100644 --- a/docs/index.html +++ b/docs/index.html @@ -70,7 +70,7 @@

Usage

} dependencies { - implementation("app.photofox.vips-ffm:vips-ffm-core:1.9.6") + implementation("app.photofox.vips-ffm:vips-ffm-core:1.9.7") }

Figure out what you're trying to do by looking at the libvips documentation @@ -79,7 +79,7 @@

Usage

You must add --enable-native-access=ALL-UNNAMED to your JVM runtime arguments. If you don't, you'll get a warning about "Restricted methods". In the future, the JVM will throw an error if you don't explicitly include this flag.

As the project uses the Java FFM API, and Markdown comments, your target must also be JDK 23+. Bindings are currently -generated from libvips 8.18.0 (but should be safe to use with different minor or patch versions).

+generated from libvips 8.18.2 (but should be safe to use with different minor or patch versions).

[!NOTE] This library does not include libvips in the download, you must add it to the system/container you're building diff --git a/gradlew.bat b/gradlew.bat index aa5f10b..24c62d5 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,82 +1,82 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables, and ensure extensions are enabled -setlocal EnableExtensions - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -"%COMSPEC%" /c exit 1 - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -"%COMSPEC%" /c exit 1 - -:execute -@rem Setup the command line - - - -@rem Execute Gradle -@rem endlocal doesn't take effect until after the line is parsed and variables are expanded -@rem which allows us to clear the local environment before executing the java command -endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel - -:exitWithErrorLevel -@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts -"%COMSPEC%" /c exit %ERRORLEVEL% +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL%