컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: 인코딩Png
#include <image_ops.h>
이미지를 PNG로 인코딩합니다.
요약
image
는 [height, width, channels]
모양의 3차원 uint8 또는 uint16 텐서 입니다. 여기서 channels
과 같습니다.
- 1: 회색조용.
- 2: 그레이스케일 + 알파용.
- 3: RGB용.
- 4: RGBA용.
ZLIB 압축 수준인 compression
PNG 인코더 기본값의 경우 -1이거나 0에서 9 사이의 값일 수 있습니다. 9는 가장 높은 압축 수준으로 가장 작은 출력을 생성하지만 속도가 느립니다.
인수:
- 범위: 범위 개체
- 이미지: 모양이
[height, width, channels]
인 3D입니다.
선택적 속성( Attrs
참조):
보고:
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
압축
Attrs Compression(
int64 x
)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# tensorflow::ops::EncodePng Class Reference\n\ntensorflow::ops::EncodePng\n==========================\n\n`#include \u003cimage_ops.h\u003e`\n\nPNG-encode an image.\n\nSummary\n-------\n\n`image` is a 3-D uint8 or uint16 [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of shape `[height, width, channels]` where `channels` is:\n\n\n- 1: for grayscale.\n- 2: for grayscale + alpha.\n- 3: for RGB.\n- 4: for RGBA.\n\n\u003cbr /\u003e\n\nThe ZLIB compression level, `compression`, can be -1 for the PNG-encoder default or a value from 0 to 9. 9 is the highest compression level, generating the smallest output, but is slower.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- image: 3-D with shape `[height, width, channels]`.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/encode-png/attrs#structtensorflow_1_1ops_1_1_encode_png_1_1_attrs)):\n\n- compression: Compression level.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 0-D. PNG-encoded image.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [EncodePng](#classtensorflow_1_1ops_1_1_encode_png_1a1dd56a89fbfdf0a35eb444d4342b2c7a)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` image)` ||\n| [EncodePng](#classtensorflow_1_1ops_1_1_encode_png_1a3f8275d8de85c565db8baef06d518dfa)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` image, const `[EncodePng::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/encode-png/attrs#structtensorflow_1_1ops_1_1_encode_png_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [contents](#classtensorflow_1_1ops_1_1_encode_png_1aac6f3548cb8e0539d4e65ddba93ac4b0) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_encode_png_1a3dd11638d8d7a6caa5c0151f099abff7) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_encode_png_1a19512289f1f780298ec73b5fd6f54ce4)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_encode_png_1aece039de4b9b0ff1b8b1462ceae15a1b)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_encode_png_1ac1a34a63520602afd8ee1c203bc2ba30)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [Compression](#classtensorflow_1_1ops_1_1_encode_png_1ab763cfa8c279c172c2ee539abdad9338)`(int64 x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/encode-png/attrs#structtensorflow_1_1ops_1_1_encode_png_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::EncodePng::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/encode-png/attrs) | Optional attribute setters for [EncodePng](/versions/r1.15/api_docs/cc/class/tensorflow/ops/encode-png#classtensorflow_1_1ops_1_1_encode_png). |\n\nPublic attributes\n-----------------\n\n### contents\n\n```text\n::tensorflow::Output contents\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### EncodePng\n\n```gdscript\n EncodePng(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input image\n)\n``` \n\n### EncodePng\n\n```gdscript\n EncodePng(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input image,\n const EncodePng::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### Compression\n\n```text\nAttrs Compression(\n int64 x\n)\n```"]]