package com.immomo.kaka.vesta.service;
import java.io.IOException;
import java.io.InputStream;
import java.util.Objects;
/**
* @author wangduanqing
* @date 2021/05/13
*/
public class WebpMux {
private final static String dir = "/Users/wangduanqing/Desktop/test/";
public static void main(String[] args) throws IOException {
String filePath = dir + "koubi.webp";
InputStream is = Runtime.getRuntime().exec("webpmux -info " + filePath).getInputStream();
String[] rows = new String(is.readAllBytes()).split("\n");
int total = Integer.parseInt(rows[3].replace("Number of frames: ", ""));
System.out.println("total frames: " + total);
WebpMuxConfig[] webpMuxConfigs = new WebpMuxConfig[total];
for (int i = 5; i < total + 5; i++) {
webpMuxConfigs[i - 5] = splitRow(rows[i]);
}
for (int i = 0; i < total; i++) {
Runtime.getRuntime().exec("webpmux -get frame " + (i + 1) + " " +
webpmux对webp动图进行解序列帧,再将序列帧合并成webp动图
最新推荐文章于 2025-09-26 06:06:26 发布
本文介绍如何使用webpmux工具对webp动图进行解序列帧和重新合并,参考了Google的webp官方文档。

最低0.47元/天 解锁文章
3362

被折叠的 条评论
为什么被折叠?



