简体   繁体   English

使用C#从二进制数据创建动画gif图像

[英]Creating animated gif image from binary data using C#

I'm creating a custom application in C# 2010 to copy images from Lotus Notes to sharepoint. 我正在C#2010中创建一个自定义应用程序,以将图像从Lotus Notes复制到sharepoint。 I'm using domino to read the content from Notes. 我正在使用domino来读取Notes中的内容。 Notes has inline animated gif image and when i read the content it comes in bytes of base64Stream. Notes有内联动画gif图像,当我读取内容时,它以base64Stream的字节为单位。 If I save the content with a .gif extension, the image is saved fine but lost the animation. 如果我使用.gif扩展名保存内容,图像会保存得很好,但会丢失动画。

Can you please let me know how to save the image with animation from a bytes of base64Stream? 你能告诉我如何使用base64Stream的字节来保存带动画的图像吗?

If you're 100% certain you're simply writing out the bytes with no alterations then I find it very unlikely the animation was lost in the process of writing it out. 如果你100%肯定你只是写出没有改动的字节,那么我发现动画在写出的过程中不太可能丢失。

Either after you write it out you're viewing it in a manner that doesn't display animations or the bytes you're writing out are without animation anyway. 在您将其写出后,您将以不显示动画的方式查看它,或者您正在写出的字节无论如何都没有动画。

Is there any way for you to directly compare both gifs (the one stored in notes and the one you've written out)? 有没有什么方法可以直接比较两个GIF(存储在笔记中的那个和你写的那个)? If you can do that you can verify that the bytes aren't the same (my money is on both files will have different sizes entirely). 如果你能做到这一点你可以验证字节是不一样的(我的钱在两个文件上将完全不同的大小)。

My current suspicion is when you get the gif using notes it doesn't properly grab the gif and simply grabs the first frame of it (MS Paint does the same thing as an example). 我目前的怀疑是,当你使用笔记获得gif时,它没有正确地抓住gif并且只是抓住它的第一帧(MS Paint与示例相同)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM