tensorflow:: אופס:: DecodeGif
#include <image_ops.h>
פענח את המסגרת/ים של תמונה מקודדת GIF לטנזור uint8.
תַקצִיר
תמונות GIF עם דחיסת מסגרת או שקיפות אינן נתמכות. במערכות Linux ו-MacOS, המר קובצי GIF מונפשים מדחוסים ללא דחוסים על ידי הפעלת:
convert $src.gif -coalesce $dst.gif
אופציה זו תומכת גם בפענוח קובצי JPEG ו-PNG, אם כי נקי יותר להשתמש tf.image.decode_image
.
טיעונים:
- scope: אובייקט Scope
- תוכן: 0-D. התמונה מקודדת GIF.
החזרות:
-
Output
: 4-D עם צורה[num_frames, height, width, 3]
. סדר ערוצי RGB.
בנאים והורסים | |
---|---|
DecodeGif (const :: tensorflow::Scope & scope, :: tensorflow::Input contents) |
תכונות ציבוריות | |
---|---|
image | |
operation |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
תכונות ציבוריות
תְמוּנָה
::tensorflow::Output image
מִבצָע
Operation operation
תפקידים ציבוריים
DecodeGif
DecodeGif( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[],null,["# tensorflow::ops::DecodeGif Class Reference\n\ntensorflow::ops::DecodeGif\n==========================\n\n`#include \u003cimage_ops.h\u003e`\n\nDecode the frame(s) of a GIF-encoded image to a uint8 tensor.\n\nSummary\n-------\n\nGIF images with frame or transparency compression are not supported. On Linux and MacOS systems, convert animated GIFs from compressed to uncompressed by running: \n\n```text\nconvert $src.gif -coalesce $dst.gif\n```\n\n\u003cbr /\u003e\n\nThis op also supports decoding JPEGs and PNGs, though it is cleaner to use `tf.image.decode_image`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- contents: 0-D. The GIF-encoded image.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 4-D with shape `[num_frames, height, width, 3]`. RGB channel order.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [DecodeGif](#classtensorflow_1_1ops_1_1_decode_gif_1ab8423cf80c3c768f78ee1ef985638c7f)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` contents)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [image](#classtensorflow_1_1ops_1_1_decode_gif_1a93c7d6f69c8b6e611635f88f1cf2bcd2) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_decode_gif_1ad61387b03e35b009466e71ba27fb1e79) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_decode_gif_1a2a2838eff458630e33d4e7f98fdb0a87)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_decode_gif_1a66486826f8ac922a28aa67df6605c508)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_decode_gif_1aeb51deab9ea7005cafb1582da6787efe)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### image\n\n```text\n::tensorflow::Output image\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### DecodeGif\n\n```gdscript\n DecodeGif(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input contents\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```"]]