TensorFlow函数教程:tf.io.decode_gif

2019-02-22 16:14 更新

tf.io.decode_gif函数

别名:

  • tf.image.decode_gif
  • tf.io.decode_gif
tf.io.decode_gif(
    contents,
    name=None
)

将GIF编码图像的第一帧解码为uint8张量。

不支持使用框架或透明度压缩的GIF将动画GIF从压缩转换为未压缩:

convert $src.gif -coalesce $dst.gif

此操作还支持解码JPEG和PNG,但使用tf.image.decode_image更简洁。

参数:

  • contents:string类型的0-d Tensor。GIF编码的图像。
  • name:操作的名称(可选)。

返回:

uint8类型的Tensor。

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号