Class VSource
java.lang.Object
app.photofox.vipsffm.VSource
- Direct Known Subclasses:
VCustomSource
Represents a VipsSource
Its constructor is package private to prevent leaking MemorySegments in to the vips-ffm API
Use its static helper methods to create new sources
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated, for removal: This API element is subject to removal in a future version.Gets the rawMemorySegment
(C pointer) for this VipsSource 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 VSource
newFromBlob
(Arena arena, VBlob blob) Create a new VSource from a VBlob, usually received from a Vips operationstatic VSource
newFromBytes
(Arena arena, byte[] bytes) Create a new VSource directly from some bytes Note that this makes a full copy of the data, which is inefficient - preferVImage.newFromFile(Arena, String, VipsOption...)
and friendsstatic VSource
newFromDescriptor
(Arena arena, int descriptor) Create a new VSource from a file descriptorstatic VSource
newFromFile
(Arena arena, String filename) Create a new VSource from a file pathstatic VSource
newFromInputStream
(Arena arena, InputStream stream) Creates a new VSource from a JavaInputStream
The provided InputStream is coupled to the arena's lifetime, and closed when its scope ends Note that you can read an image directly from an InputStream usingVImage.newFromStream(Arena, InputStream, VipsOption...)
This stream does not support seeking, because InputStream does not support it, so cannot be maximally efficient - but it is still likely more efficient than taking a full intermediate copy of bytesstatic VSource
newFromOptions
(Arena arena, String options)
-
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 VipsSource 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
-
newFromDescriptor
-
newFromFile
-
newFromBlob
-
newFromBytes
Create a new VSource directly from some bytes Note that this makes a full copy of the data, which is inefficient - preferVImage.newFromFile(Arena, String, VipsOption...)
and friends- Throws:
VipsError
-
newFromOptions
-
newFromInputStream
Creates a new VSource from a JavaInputStream
The provided InputStream is coupled to the arena's lifetime, and closed when its scope ends Note that you can read an image directly from an InputStream usingVImage.newFromStream(Arena, InputStream, VipsOption...)
This stream does not support seeking, because InputStream does not support it, so cannot be maximally efficient - but it is still likely more efficient than taking a full intermediate copy of bytes- Throws:
VipsError
-
getUnsafeStructAddress()