下面的代码是使用ImageMagik解码webp并将其保存到.gif中,当使用跟踪条在帧之间滚动时,为什么会有白色方块或图像的一部分似乎没有正确呈现?
编辑:看起来像是破碎的图像只渲染了自上一帧以来“改变”的部分,而不是渲染所有东西,如果这能让它变得更清晰的话。
internal class ImageIO {
public Img img = new Img();
/// <summary>
/// Update PictureBox with new image
/// </summary>
/// <param name="pb">PictureBox Gadget</param>
/// <param name="frame">int frame</param>
/// <remarks>This function is not 'safe' as you can pass any arbitrary int frame value even
/// if it is out of range.</remarks>
public void UpdateAnimation(PictureBox pb, int frame) {
var fr = img.cImgCollection[frame];
pb.Image = fr.ToBitmap();
}
}发布于 2021-10-31 01:41:52
加载代码中的问题更深,原来这就是问题所在;
imagemagick leaves artifacts in gif to jpg list conversion
并通过添加来固定;
webpcollection.Coalesce();https://stackoverflow.com/questions/69783065
复制相似问题