@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class EncodeJpeg extends Pointer
image
is a 3-D uint8 Tensor of shape [height, width, channels]
.
The attr format
can be used to override the color format of the encoded
output. Values can be:
* ''
: Use a default format based on the number of channels in the image.
* grayscale
: Output a grayscale JPEG image. The channels
dimension
of image
must be 1.
* rgb
: Output an RGB JPEG image. The channels
dimension
of image
must be 3.
If format
is not specified or is the empty string, a default format is picked
in function of the number of channels in image
:
* 1: Output a grayscale image.
* 3: Output an RGB image.
Arguments:
* scope: A Scope object
* image: 3-D with shape [height, width, channels]
.
Optional attributes (see Attrs
):
* format: Per pixel image format.
* quality: Quality of the compression from 0 to 100 (higher is better and slower).
* progressive: If True, create a JPEG that loads progressively (coarse to fine).
* optimize_size: If True, spend CPU/RAM to reduce size with no quality change.
* chroma_downsampling: See http://en.wikipedia.org/wiki/Chroma_subsampling.
* density_unit: Unit used to specify x_density
and y_density
:
pixels per inch ('in'
) or centimeter ('cm'
).
* x_density: Horizontal pixels per density unit.
* y_density: Vertical pixels per density unit.
* xmp_metadata: If not empty, embed this XMP metadata in the image header.
Returns:
* Output
: 0-D. JPEG-encoded image.Modifier and Type | Class and Description |
---|---|
static class |
EncodeJpeg.Attrs
Optional attribute setters for EncodeJpeg
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
EncodeJpeg(Pointer p)
Pointer cast constructor.
|
EncodeJpeg(Scope scope,
Input image) |
EncodeJpeg(Scope scope,
Input image,
EncodeJpeg.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
static EncodeJpeg.Attrs |
ChromaDownsampling(boolean x) |
Output |
contents() |
EncodeJpeg |
contents(Output setter) |
static EncodeJpeg.Attrs |
DensityUnit(BytePointer x) |
static EncodeJpeg.Attrs |
DensityUnit(String x) |
static EncodeJpeg.Attrs |
Format(BytePointer x) |
static EncodeJpeg.Attrs |
Format(String x) |
Node |
node() |
Operation |
operation() |
EncodeJpeg |
operation(Operation setter) |
static EncodeJpeg.Attrs |
OptimizeSize(boolean x) |
static EncodeJpeg.Attrs |
Progressive(boolean x) |
static EncodeJpeg.Attrs |
Quality(long x) |
static EncodeJpeg.Attrs |
XDensity(long x) |
static EncodeJpeg.Attrs |
XmpMetadata(BytePointer x) |
static EncodeJpeg.Attrs |
XmpMetadata(String x) |
static EncodeJpeg.Attrs |
YDensity(long x) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public EncodeJpeg(Pointer p)
Pointer(Pointer)
.public Node node()
@ByVal public static EncodeJpeg.Attrs Format(@tensorflow.StringPiece BytePointer x)
@ByVal public static EncodeJpeg.Attrs Format(@tensorflow.StringPiece String x)
@ByVal public static EncodeJpeg.Attrs Quality(@Cast(value="tensorflow::int64") long x)
@ByVal public static EncodeJpeg.Attrs Progressive(@Cast(value="bool") boolean x)
@ByVal public static EncodeJpeg.Attrs OptimizeSize(@Cast(value="bool") boolean x)
@ByVal public static EncodeJpeg.Attrs ChromaDownsampling(@Cast(value="bool") boolean x)
@ByVal public static EncodeJpeg.Attrs DensityUnit(@tensorflow.StringPiece BytePointer x)
@ByVal public static EncodeJpeg.Attrs DensityUnit(@tensorflow.StringPiece String x)
@ByVal public static EncodeJpeg.Attrs XDensity(@Cast(value="tensorflow::int64") long x)
@ByVal public static EncodeJpeg.Attrs YDensity(@Cast(value="tensorflow::int64") long x)
@ByVal public static EncodeJpeg.Attrs XmpMetadata(@tensorflow.StringPiece BytePointer x)
@ByVal public static EncodeJpeg.Attrs XmpMetadata(@tensorflow.StringPiece String x)
public EncodeJpeg operation(Operation setter)
public EncodeJpeg contents(Output setter)
Copyright © 2022. All rights reserved.