Stay organized with collections
Save and categorize content based on your preferences.
#include <image_ops.h>
Extract the shape information of a JPEG-encoded image.
Summary
This op only parses the image header, so it is much faster than DecodeJpeg.
Args:
- scope: A Scope object
- contents: 0-D. The JPEG-encoded image.
Optional attributes (see Attrs
):
- output_type: (Optional) The output type of the operation (int32 or int64). Defaults to int32.
Returns:
Output
: 1-D. The image shape with format [height, width, channels].
Public attributes
Public functions
Public static functions
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::ExtractJpegShape Class Reference\n\ntensorflow::ops::ExtractJpegShape\n=================================\n\n`#include \u003cimage_ops.h\u003e`\n\nExtract the shape information of a JPEG-encoded image.\n\nSummary\n-------\n\nThis op only parses the image header, so it is much faster than [DecodeJpeg](/versions/r2.14/api_docs/cc/class/tensorflow/ops/decode-jpeg#classtensorflow_1_1ops_1_1_decode_jpeg).\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- contents: 0-D. The JPEG-encoded image.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs#structtensorflow_1_1ops_1_1_extract_jpeg_shape_1_1_attrs)):\n\n- output_type: (Optional) The output type of the operation (int32 or int64). Defaults to int32.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 1-D. The image shape with format \\[height, width, channels\\].\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ExtractJpegShape](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a64ffa4ea238d244c52716d482a64aeb4)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` contents)` ||\n| [ExtractJpegShape](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a5c8f40a8498a2351175856f88c12df3b)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` contents, const `[ExtractJpegShape::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs#structtensorflow_1_1ops_1_1_extract_jpeg_shape_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [image_shape](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a119b30980cd88aeb7e800ef248fe0ef9) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a93aaacf0ede8a075a9e7cbaae6ec1851) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1afbd0f7b3f51267da79a8d34265bc3cd3)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a93f3c5b2f3246fb2633916edd1a51b2a)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1aa148b0c56486902349d41f68d956164d)`() const ` | |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| [OutputType](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a74c981eaa0a2024456fbe7c35c65b01e)`(DataType x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs#structtensorflow_1_1ops_1_1_extract_jpeg_shape_1_1_attrs) |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ExtractJpegShape::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs) | Optional attribute setters for [ExtractJpegShape](/versions/r2.14/api_docs/cc/class/tensorflow/ops/extract-jpeg-shape#classtensorflow_1_1ops_1_1_extract_jpeg_shape). |\n\nPublic attributes\n-----------------\n\n### image_shape\n\n```scdoc\n::tensorflow::Output image_shape\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### ExtractJpegShape\n\n```gdscript\n ExtractJpegShape(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input contents\n)\n``` \n\n### ExtractJpegShape\n\n```gdscript\n ExtractJpegShape(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input contents,\n const ExtractJpegShape::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### OutputType\n\n```text\nAttrs OutputType(\n DataType x\n)\n```"]]