コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テンソルフロー::作戦::デコードGIF
#include <image_ops.h>
GIF エンコードされた画像のフレームを uint8 テンソルにデコードします。
まとめ
フレームまたは透明度圧縮を使用した GIF 画像はサポートされていません。 Linux および MacOS システムでは、以下を実行してアニメーション GIF を圧縮から非圧縮に変換します。
convert $src.gif -coalesce $dst.gif
この操作は JPEG と PNG のデコードもサポートしていますが、 tf.image.decode_image
を使用する方がよりクリーンです。
引数:
- スコープ:スコープオブジェクト
- 内容: 0-D。 GIF エンコードされた画像。
戻り値:
-
Output
: 形状[num_frames, height, width, 3]
の 4-D。 RGB チャンネルの順序。
パブリック属性
公共機能
ノード
::tensorflow::Node * node() const
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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```"]]