Class VTarget
java.lang.Object
app.photofox.vipsffm.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)
) Returns the contents of the backing VBlobDeprecated, for removal: This API element is subject to removal in a future version.Gets the rawMemorySegment
(C pointer) for this VipsTarget struct The 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 withVipsHelper
int
hashCode()
static VTarget
newFromOutputStream
(Arena arena, OutputStream stream) Create a new VipsTarget pointed at a JavaOutputStream
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 usingVImage.writeToStream(OutputStream, String, VipsOption...)
This target can also be used with (for example)VImage.writeToTarget(VTarget, String, VipsOption...)
static VTarget
newToDescriptor
(Arena arena, int descriptor) Create a new target pointed at a file descriptor This target can be used with (for example)VImage.writeToTarget(VTarget, String, VipsOption...)
static VTarget
Create a new target pointed at an output file This target can be used with (for example)VImage.writeToTarget(VTarget, String, VipsOption...)
static VTarget
newToMemory
(Arena arena) Create a new memory-backed VipsTarget This target can be used with (for example)VImage.writeToTarget(VTarget, String, VipsOption...)
After writing to this target, you can also retrieve the backingVBlob
withgetBlob()
-
Method Details
-
equals
-
hashCode
-
getUnsafeAddress
Deprecated, for removal: This API element is subject to removal in a future version. -
getUnsafeStructAddress
Gets the rawMemorySegment
(C pointer) for this VipsTarget struct The 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 withVipsHelper
-
newToDescriptor
Create a new target pointed at a file descriptor This target can be used with (for example)VImage.writeToTarget(VTarget, String, VipsOption...)
- Throws:
VipsError
-
newToFile
-
newToMemory
Create a new memory-backed VipsTarget This target can be used with (for example)VImage.writeToTarget(VTarget, String, VipsOption...)
After writing to this target, you can also retrieve the backingVBlob
withgetBlob()
- Throws:
VipsError
-
getBlob
Only valid for memory-backed targets (eg vianewToMemory(Arena)
) Returns the contents of the backing VBlob- Throws:
VipsError
-
newFromOutputStream
Create a new VipsTarget pointed at a JavaOutputStream
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 usingVImage.writeToStream(OutputStream, String, VipsOption...)
This target can also be used with (for example)VImage.writeToTarget(VTarget, String, VipsOption...)
- Throws:
VipsError
-
getUnsafeStructAddress()