Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repositories {
}

dependencies {
implementation("app.photofox.vips-ffm:vips-ffm-core:1.9.1")
implementation("app.photofox.vips-ffm:vips-ffm-core:1.9.2")
}
```

Expand Down
9 changes: 9 additions & 0 deletions core/src/main/java/app/photofox/vipsffm/VImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -10132,6 +10132,15 @@ public List<String> getFields() {
return fieldNameStrings;
}

/// Helper function to remove the metadata stored at `name` on this image
///
/// Returns false if there was no metadata entry at `name`
///
/// See also: [libvips header docs](https://www.libvips.org/API/current/libvips-header.html)
public boolean remove(String name) {
return VipsHelper.image_remove(arena, this.address, name);
}

/// Helper record to hold multiple outputs from the [VImage#findTrim] operation
public record FindTrimOutput(int left, int top, int width, int height) {
}
Expand Down
14 changes: 14 additions & 0 deletions core/src/main/java/app/photofox/vipsffm/VipsHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1609,6 +1609,20 @@ public static long image_get_typeof(Arena arena, MemorySegment image, String nam
return result;
}

/// Binding for:
/// ```c
/// gboolean vips_image_remove(VipsImage *image, const char *name)
/// ```
public static boolean image_remove(Arena arena, MemorySegment image, String nameString) throws
VipsError {
if(!VipsValidation.isValidPointer(image)) {
VipsValidation.throwInvalidInputError("vips_image_remove", "image");
}
var name = arena.allocateFrom(nameString);
var result = VipsRaw.vips_image_remove(image, name);
return result == 1;
}

/// Binding for:
/// ```c
/// void *vips_image_map(VipsImage *image, VipsImageMapFn fn, void *a)
Expand Down
59 changes: 59 additions & 0 deletions core/src/main/java/app/photofox/vipsffm/jextract/VipsRaw.java
Original file line number Diff line number Diff line change
Expand Up @@ -9906,6 +9906,65 @@ public static long vips_image_get_typeof(MemorySegment image, MemorySegment name
}
}

private static class vips_image_remove {
public static final FunctionDescriptor DESC = FunctionDescriptor.of(
VipsRaw.C_INT,
VipsRaw.C_POINTER,
VipsRaw.C_POINTER
);

public static final MemorySegment ADDR = VipsRaw.findOrThrow("vips_image_remove");

public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
}

/**
* Function descriptor for:
* {@snippet lang=c :
* extern gboolean vips_image_remove(VipsImage *image, const char *name)
* }
*/
public static FunctionDescriptor vips_image_remove$descriptor() {
return vips_image_remove.DESC;
}

/**
* Downcall method handle for:
* {@snippet lang=c :
* extern gboolean vips_image_remove(VipsImage *image, const char *name)
* }
*/
public static MethodHandle vips_image_remove$handle() {
return vips_image_remove.HANDLE;
}

/**
* Address for:
* {@snippet lang=c :
* extern gboolean vips_image_remove(VipsImage *image, const char *name)
* }
*/
public static MemorySegment vips_image_remove$address() {
return vips_image_remove.ADDR;
}

/**
* {@snippet lang=c :
* extern gboolean vips_image_remove(VipsImage *image, const char *name)
* }
*/
public static int vips_image_remove(MemorySegment image, MemorySegment name) {
var mh$ = vips_image_remove.HANDLE;
try {
if (TRACE_DOWNCALLS) {
traceDowncall("vips_image_remove", image, name);
}
return (int)mh$.invokeExact(image, name);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}

private static class vips_image_map {
public static final FunctionDescriptor DESC = FunctionDescriptor.of(
VipsRaw.C_POINTER,
Expand Down
482 changes: 250 additions & 232 deletions docs/app.photofox.vipsffm/app/photofox/vipsffm/VImage.html

Large diffs are not rendered by default.

498 changes: 264 additions & 234 deletions docs/app.photofox.vipsffm/app/photofox/vipsffm/VipsHelper.html

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions docs/app.photofox.vipsffm/app/photofox/vipsffm/jextract/VipsRaw.html
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,10 @@
<li><a href="#vips_image_get_typeof$handle()" tabindex="0">vips_image_get_typeof$handle()</a></li>
<li><a href="#vips_image_get_typeof$address()" tabindex="0">vips_image_get_typeof$address()</a></li>
<li><a href="#vips_image_get_typeof(java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment)" tabindex="0">vips_image_get_typeof(MemorySegment, MemorySegment)</a></li>
<li><a href="#vips_image_remove$descriptor()" tabindex="0">vips_image_remove$descriptor()</a></li>
<li><a href="#vips_image_remove$handle()" tabindex="0">vips_image_remove$handle()</a></li>
<li><a href="#vips_image_remove$address()" tabindex="0">vips_image_remove$address()</a></li>
<li><a href="#vips_image_remove(java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment)" tabindex="0">vips_image_remove(MemorySegment, MemorySegment)</a></li>
<li><a href="#vips_image_map$descriptor()" tabindex="0">vips_image_map$descriptor()</a></li>
<li><a href="#vips_image_map$handle()" tabindex="0">vips_image_map$handle()</a></li>
<li><a href="#vips_image_map$address()" tabindex="0">vips_image_map$address()</a></li>
Expand Down Expand Up @@ -9445,6 +9449,50 @@ <h2>Method Summary</h2>
</div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#vips_image_remove(java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment)" class="member-name-link">vips_image_remove</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;image,
<a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;name)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove(java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment)1"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#vips_image_remove$address()" class="member-name-link">vips_image_remove$address</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Address for:

<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove$address()1"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/FunctionDescriptor.html" title="class or interface in java.lang.foreign" class="external-link">FunctionDescriptor</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#vips_image_remove$descriptor()" class="member-name-link">vips_image_remove$descriptor</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Function descriptor for:

<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove$descriptor()1"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/invoke/MethodHandle.html" title="class or interface in java.lang.invoke" class="external-link">MethodHandle</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#vips_image_remove$handle()" class="member-name-link">vips_image_remove$handle</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Downcall method handle for:

<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove$handle()1"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#vips_image_set_area(java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment)" class="member-name-link">vips_image_set_area</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;image,
<a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;name,
Expand Down Expand Up @@ -25281,6 +25329,66 @@ <h3>vips_image_get_typeof</h3>
</section>
</li>
<li>
<section class="detail" id="vips_image_remove$descriptor()">
<h3>vips_image_remove$descriptor</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/FunctionDescriptor.html" title="class or interface in java.lang.foreign" class="external-link">FunctionDescriptor</a></span>&nbsp;<span class="element-name">vips_image_remove$descriptor</span>()</div>
<div class="block">Function descriptor for:

<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove$descriptor()2"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
</section>
</li>
<li>
<section class="detail" id="vips_image_remove$handle()">
<h3>vips_image_remove$handle</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/invoke/MethodHandle.html" title="class or interface in java.lang.invoke" class="external-link">MethodHandle</a></span>&nbsp;<span class="element-name">vips_image_remove$handle</span>()</div>
<div class="block">Downcall method handle for:

<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove$handle()2"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
</section>
</li>
<li>
<section class="detail" id="vips_image_remove$address()">
<h3>vips_image_remove$address</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a></span>&nbsp;<span class="element-name">vips_image_remove$address</span>()</div>
<div class="block">Address for:

<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove$address()2"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
</section>
</li>
<li>
<section class="detail" id="vips_image_remove(java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment)">
<h3>vips_image_remove</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">vips_image_remove</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;image,
<a href="https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;name)</span></div>
<div class="block">
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../resource-files/copy.svg" alt="Copy snippet"></button>
<pre class="snippet" id="snippet-vips_image_remove(java.lang.foreign.MemorySegment,java.lang.foreign.MemorySegment)2"><code class="language-c">extern gboolean vips_image_remove(VipsImage *image, const char *name)
</code></pre>
</div>
</div>
</div>
</section>
</li>
<li>
<section class="detail" id="vips_image_map$descriptor()">
<h3>vips_image_map$descriptor</h3>
<div class="horizontal-scroll">
Expand Down
Loading
Loading