4

I'm creating a custom application in C# 2010 to copy images from Lotus Notes to sharepoint. I'm using domino to read the content from Notes. Notes has inline animated gif image and when i read the content it comes in bytes of base64Stream. If I save the content with a .gif extension, the image is saved fine but lost the animation.

Can you please let me know how to save the image with animation from a bytes of base64Stream?

RSP
  • 231
  • 1
  • 3
  • 14
  • 3
    If all you're dealing with is raw bytes, the animation was lost earlier. – SLaks Dec 26 '11 at 13:56
  • 1
    There are a number of suggestions for solving your problem on this other post of yours: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/21bbe070-6c87-4f2f-93c4-22f7c1ea1648/ – Peter Dec 29 '11 at 20:02
  • Hi, have a look at this thread, once you got the stream of the image you can write it down to a file using the Image class : http://stackoverflow.com/questions/8773936/best-way-to-save-an-image/8774086#comment10938461_8774086 – Giorgio Minardi Jan 07 '12 at 23:58

1 Answers1

1

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.

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)? 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).

meds
  • 21,699
  • 37
  • 163
  • 314