Class VTarget
- Direct Known Subclasses:
VCustomTarget
Represents a VipsTarget
Its constructor is package private to prevent leaking MemorySegments in to the vips-ffm API
Use its static helper methods to create new targets
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
getBlob()
Only valid for memory-backed targets (eg vianewToMemory(Arena)
)Deprecated, for removal: This API element is subject to removal in a future version.Gets the rawMemorySegment
(C pointer) for this VipsTarget structint
hashCode()
static VTarget
newFromOutputStream
(Arena arena, OutputStream stream) Create a new VipsTarget pointed at a Java
OutputStream
The provided OutputStream is coupled to the arena's lifetime, and closed when its scope ends
Note that you can directly write an image to an OutputStream using
VImage.writeToStream(java.io.OutputStream, java.lang.String, app.photofox.vipsffm.VipsOption...)
This target can also be used with (for example)
VImage.writeToTarget(app.photofox.vipsffm.VTarget, java.lang.String, app.photofox.vipsffm.VipsOption...)
static VTarget
newToDescriptor
(Arena arena, int descriptor) Create a new target pointed at a file descriptorstatic VTarget
Create a new target pointed at an output filestatic VTarget
newToMemory
(Arena arena) Create a new memory-backed VipsTarget
-
Method Details
-
equals
-
hashCode
-
getUnsafeAddress
Deprecated, for removal: This API element is subject to removal in a future version. -
getUnsafeStructAddress
Gets the raw
MemorySegment
(C pointer) for this VipsTarget structThe memory address' lifetime is bound to the scope of the arena that created it
Usage of the memory address is strongly discouraged, but it is available if some functionality is missing, and you need to use it with
VipsHelper
-
newToDescriptor
Create a new target pointed at a file descriptor
This target can be used with (for example)
VImage.writeToTarget(app.photofox.vipsffm.VTarget, java.lang.String, app.photofox.vipsffm.VipsOption...)
- Throws:
VipsError
-
newToFile
-
newToMemory
Create a new memory-backed VipsTarget
This target can be used with (for example)
VImage.writeToTarget(app.photofox.vipsffm.VTarget, java.lang.String, app.photofox.vipsffm.VipsOption...)
After writing to this target, you can also retrieve the backing
VBlob
withgetBlob()
- Throws:
VipsError
-
getBlob
Only valid for memory-backed targets (eg via
newToMemory(Arena)
)Returns the contents of the backing VBlob
- Throws:
VipsError
-
newFromOutputStream
Create a new VipsTarget pointed at a Java
OutputStream
The provided OutputStream is coupled to the arena's lifetime, and closed when its scope ends
Note that you can directly write an image to an OutputStream using
VImage.writeToStream(java.io.OutputStream, java.lang.String, app.photofox.vipsffm.VipsOption...)
This target can also be used with (for example)
VImage.writeToTarget(app.photofox.vipsffm.VTarget, java.lang.String, app.photofox.vipsffm.VipsOption...)
- Throws:
VipsError
-
getUnsafeStructAddress()