|
Software i developed with this Gif.Components.dll is deleted by security soft (Norton 2010) warning with high level risk. There was no warning with other security soft (Mcafee).
Is anyone encountered with this kind of problem with this dll?
-----------------
There is no warning with Debug file, only Release file.
Visual Studio 2008
Windows7
modified on Monday, December 20, 2010 8:45 AM
|
|
|
|
|
>Is anyone encountered with this kind of problem with this dll?
Yes, every Norton user. The solution to this is to install some normal security software, which is used by normal people, for example, Kaspersky Antivirus 2012.
|
|
|
|
|
I'm just trying to understand the LZWEncoder part of the code better... at one point there's a call to LZWEncoder:
LZWEncoder encoder = new LZWEncoder(width, height, indexedPixels, colorDepth);
But at this point, indexedPixels is only one third the size of the orginal array (Pixels), whiel width and height are their
original values. Inside LZWEncoder loops on indexedPixels width x height times... and thus should get an array out of bounds
error.... shouldn't it?
|
|
|
|
|
Hi,
I am using GifDecoder.cs and I have been hitting some issues like out of bound array exceptions. I don't want to mess up with the code if I can get the updated version of it. It would greatly help me to work on my project.
If anyone has the updated version of it please send it to muppadivya@gmail.com
Thank you,
Divya.
|
|
|
|
|
For some odd reason when I try to do this with images that have a transparent background, it makes the background color black and it makes the bottom right corner's pixel a different color for each frame.
When I try to use SetTransparency(Color) It still does the bottom right corner thing and keeps the 2nd or 3rd frame black instead of transparent.
|
|
|
|
|
The first frame of all exported gifs seems to have each pixel of one (and only one) color replaced with white.
This only happens with the first frame. Someone help, please, because this is driving me insane.
|
|
|
|
|
|
Awesome Thank you Simon !
|
|
|
|
|
Hello,
nice work on this library. One detail though; after AnimatedGifEncoder finishes i try to delete the input files however the following exception arises: "System.IO.IOException: The process cannot access the file 'C:\img.jpg.2gf.5' because it is being used by another process."
This is the code that i have added the Example.Main().
Thread t = new Thread(delegate()
{
try
{
foreach (var filePath in imageFilePaths)
{
new FileInfo(filePath).Delete();
}
}
catch (IOException ex)
{
}
});
t.Start();
It catches the exception and it is the cleanest way around i could find. I would like, however, to know if is there any other way around it, like forcing the release of the images in your src code ?
Thank you
|
|
|
|
|
I had this same problem, on two counts.
The plan was
Collect the images (in my case from videos using ffmpeg).
Create the GIF.
Remove the images because I don't need them anymore.
My first attempt I could not get AnimatedGifEncoder to let go of the image files, but also, if I went back in to recreate the GIF file after the first creation, it would not let go of that file either so that my code could replace it. That first attempt I had to use newly named gif files, then I could remove the old one once that was made.
So U moved on, I usualy do anything ffmpeg in its own thread anyway, but decided to do the same with AnimatedGifEncoder.
New plan
Run thread to collect images.
When ready Run thread to create GIF
When both are finished (and removed) I can remove the images and run another thread to replace the GIF.
I have to say that I am not yet convinced this is an AnimatedGifEncoder problem, I am getting hints now that it is something to do with C#. This problem does not occur in either java or C++.
I had to sign up, I felt a bit guilty borrowing code ideas and not giving anything back.
|
|
|
|
|
Hi gOODiDEA.NET, great work.
I've created a derived work based on Phil@ThinkEdge's amended version of this library. The main changes I've made are adding support for a single global colour table (as opposed to a local colour table for each frame) to the encoder, making use of generics in .net 2.0, and factoring out many of the building blocks of GIF files into their own separate classes with most of their attributes exposed as public properties.
I've also written two small applications which make use of this derived work, and I'd like to publish/release the lot under a free software license (ideally the GNU GPL if that's compatible with the CPOL). Would that be OK with you?
Simon.
|
|
|
|
|
Please do !!!!
We cant wait for a new version
(if you dont want to make it public yet, would you mind to send it to me, so i can try it ?)
cheers
|
|
|
|
|
I'd love to release it into the wild, I'm just slightly reluctant to do so without GoodIdea.Net's blessing. Having said that, I'm not sure he's ever going to read or reply to this thread, so where would I stand legally if I just went ahead and released it?
Most importantly, would I be in breach of the CPOL if I were to release my version under the GPL without waiting for permission? I've read the comparison of licenses page, and I still think the GPL is most appropriate for my needs - I just want to get my code out there and have other people using it, pointing out bugs etc, I have no interest in making money out of it.
I'm not sure whether my version will count as an improvement on the one posted here. Some may find it easier to understand and use, some may find it's a lot slower, some may find it doesn't support what they could do with the original version (I'm pretty sure I've broken some features of the animator although the ones I'm using seem to work just fine). But that's where I need you good folks to try it out, and to let me know where you find it isn't working for you. And that's why I need to resolve this issue over licensing so that I can publish with a clean conscience
|
|
|
|
|
Then why dont you release it under CPOL ?
|
|
|
|
|
Releasing my version under the CPOL would be an option (although clause 5b says "You agree not to advertise or in any way imply that this Work is a product of Your own" so am I already breaking that clause by calling it "my version"? ).
But there are still issues around compatibility with the GPL - what happens when someone wants to write an application which uses this library and release the application under the GPL? Can they GPL everything except this library and retain the CPOL on this library?
(I already have just such an application, which really is all my own work, a Windows Forms app which reads in a GIF file and displays all the information about it which the GifDecoder class exposes. I hope to publish this at the same time as it also serves as example code for how to use the library)
My preference for the GPL over the CPOL (not that I was intending to start a debate about their relative merits) is that the GPL goes to great lengths to ensure that nobody can "close" GPL code (i.e. patent it or otherwise prevent other people taking advantage of its open source nature). The CPOL seems a bit lightweight by comparison. I'm not a lawyer, but I'm not convinced it offers the same level of protection.
Also, CPOL 5e says "You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder". How would this work with an application made of mostly GPL code and one library which is CPOL? Does GPL'ing the rest of the application count as restricting the terms of the CPOL on the library to which it applies?
Any advice welcome... I'm keen to get this library released, but I want to do it right
modified on Wednesday, October 7, 2009 3:51 PM
|
|
|
|
|
how do i resize an animated gif background transparency
modified on Thursday, August 27, 2009 4:06 AM
|
|
|
|
|
Thank you for the open source code. Works like a champ!!!
I have run into an issue with a few of the animated gifs having a transparent background when they should NOT have a transparent background.
Can I re-enforce no transparent background during the resizing process?
My implementation of your open source code...
string _tempID = Path.GetFileNameWithoutExtension(_file);
string _path = String.Format(@"~/assets/images/temp/{0}/{1}", this.Session.SessionID, _tempID.ToString());
_path = Server.MapPath(_path);
if (!System.IO.Directory.Exists(_path))
System.IO.Directory.CreateDirectory(_path);
GifDecoder _gifDecoder = new GifDecoder();
_gifDecoder.Read(_file);
for (int i = 0, count = _gifDecoder.GetFrameCount(); i < count; i++)
{
System.Drawing.Image frame = _gifDecoder.GetFrame(i);
frame.Save(String.Format(@"{0}\{1}.png", _path, Guid.NewGuid().ToString()), ImageFormat.Png);
}
AnimatedGifEncoder _encoder = new AnimatedGifEncoder();
_encoder.SetTransparent(Color.Empty);
using (FileStream imageStream =
new FileStream( _path + @"\temp.gif" ,FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None))
{
_encoder.Start(imageStream);
_encoder.SetDelay(_gifDecoder.GetDelay(0));
_encoder.SetRepeat(0);
string[] _imagePaths = System.IO.Directory.GetFiles(_path, "*.png");
for (int i = 0, count = _imagePaths.Length; i < count; i++)
_encoder.AddFrame(this.resize(_imagePaths[i], newWidth, newHeight, _increaseImageSize));
byte[] imageContent = new Byte[imageStream.Length];
imageStream.Position = 0;
imageStream.Read(imageContent, 0, (int)imageStream.Length);
this.Response.ContentType = _contentType;
this.Response.AddHeader("content-length", System.Convert.ToString(imageStream.Length));
this.Response.BinaryWrite(imageContent);
}
try
{
foreach (string _f in System.IO.Directory.GetFiles(_path))
System.IO.File.Delete(_f);
System.IO.Directory.Delete(_path);
System.IO.Directory.Delete(System.IO.Directory.GetParent(_path).ToString());
}
catch (Exception _ex) { Console.Write(_ex.ToString());}
_encoder.Finish();
_encoder = null;
_gifDecoder = null;
this.Response.End();
I'm listening but I only speak GEEK.
|
|
|
|
|
Hello friend, i tried to build animations with several pictures, but only 19 pictures could be stored.
Is this problem of the library or limitation of gif animations?
Please inform me.
Thanks.
inamullah, Pakistan.
|
|
|
|
|
Would any one be able to tell me the following?
before extracting a animated gif to still images and resizing it and putting it back together.
I need to know how to capture every frames timeline as I need some images to stay longer that others.
Then resize them greating an animated gif again.
this must happen using .net
Or if possible to resize the gif not pulling it apart..
Any help will be appreciated
|
|
|
|
|
Please visit http://www.codeplex.com/GifLib
sorry, I can't find entry for updating the article
|
|
|
|
|
|
could you provide an English version?
while looking at your new code on codeplex, it's impossible to compile it
thanks
|
|
|
|
|
Sorry but yours on CodePlex is a much worse "implement"!
You claim yours better but you don't deign to provide a "three-line sample by way of documentation, and on top of everything, it doesn't work: just a waste of time.
Kudos for NGif...
|
|
|
|
|
Is GifLib made by you? Or someone else?
|
|
|
|
|
看到有贴子把
GetPixels
改成
(bitmap.PixelFormat == PixelFormat.Format32bppArgb ||
bitmap.PixelFormat == PixelFormat.Format32bppPArgb ||
bitmap.PixelFormat == PixelFormat.Format32bppRgb)
这种方式。
可是生成的GIF图片,用Fireworks 等的GIF软件 导入导出(不做任何操作)的图片都会把体积减了很多。。
真搞不懂
|
|
|
|