VintaSoft Imaging .NET SDK and Plug-ins Discussions

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Board index < VintaSoft Imaging < VintaSoft Imaging .NET SDK and Plug-ins Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Issue set delay Frame in Convert to .gif



Issue set delay Frame in Convert to .gif

Post by dovanmy211 »

Hello !
I'm having issue set page delay in converting to gif. I set 30 image play / 1s and loop 10 . total time play = 1000 . 1s = 100 => A page delay = 3.333333333333333.
I using property NewFileGif.Pages.Delay but type data int only receive 3.
=> total time play 30 page 30 x 3 = 90 loop 10. total time play 10 x 90= 900. SDK support set 1000/1s ?

I'm using version 6.1 from your application.

Thanks in advance!
Best regards,


Re: Issue set delay Frame in Convert to .gif

Post by Alex »

Hello,

Delay between GIF frames can be specified in 1/100 of second.

In your case you can go 2 ways:
  • Use 30 frames and 3/100 second as delay between GIF frames
  • Use 25 frames and 4/100 second as delay between GIF frames
Best regards, Alexander


Re: Issue set delay Frame in Convert to .gif

Post by dovanmy211 »

Hello,
Thanks for answering my question. You can help me check source are correct ?
Thanks in advance!
Best regards,
My Source :
GifFile NewFileGif = new GifFile(1980, 1020);
int delayImage = 100 / 30;  // Time 1s / 30 image = Time delay a Image
int loopMovie = 10; // Loop Gif
for (int i = 0; i < loopMovie; i++) // loop 10
{
    for (int a = 0; a < 30; a++) // Add 30 Image 
    {
         VintasoftImage imgobj = new VintasoftImage(this.ListContens[0].ListPath[a].ToString());
         NewFileGif.Pages.Add(imgobj);
         NewFileGif.Pages[a].Delay = delayImage;
         imgobj.Dispose();
    }
}

NewFileGif.Save(this.ListContens[0].PathMovieOutput);
NewFileGif.Dispose();


Re: Issue set delay Frame in Convert to .gif

Post by Alex »

Hello,

Your code is not optimal, here is better code:
GifFile NewFileGif = new GifFile(1980, 1020);

int delayImage = 100 / 30;  // Time 1s / 30 image = Time delay a Image
for (int a = 0; a < 30; a++) // Add 30 Image 
{
     VintasoftImage imgobj = new VintasoftImage(this.ListContens[0].ListPath[a].ToString());
     NewFileGif.Pages.Add(imgobj);
     NewFileGif.Pages[a].Delay = delayImage;
     imgobj.Dispose();
}

int loopMovie = 10; // Loop Gif
NewFileGif.NumberOfAnimationCycles = loopMovie;

NewFileGif.Save(this.ListContens[0].PathMovieOutput);
NewFileGif.Dispose();
Best regards, Alexander


Re: Issue set delay Frame in Convert to .gif

Post by dovanmy211 »

Thanks you ^^.
Best regards


Re: Issue set delay Frame in Convert to .gif

Post by dovanmy211 »

Hi Alex.
I'm having issue set page delay in converting to gif.I play 45 Image in 10s. IMG 01 -> 15 play ins 1s. IMG 16->45 Play in 1s and loop count = 10. I can set loop count = 10 in about IMG 16->45 ? or how to other resolve
I'm using version 6.1 from your application.

Thanks in advance!
Best regards,


Re: Issue set delay Frame in Convert to .gif

Post by dovanmy211 »

Hi Alex,

I want convert as follows:
Convert GIF File total 60 IMAGE
[00001пЅћ00015] play [0.5s] and loop count = 1пј‹[00016пЅћ00045] play [1s] and loop count = 9 пј‹[00046пЅћ000060] play [0.5s] and loop count = 1

My current code :
[00001пЅћ00015] : Add 10 Image to GIF File
[00016пЅћ00045] : Add 9 time Image [00016пЅћ00045] to repeat 9 time. 30img x 9 = 270 => Add 270 Img. Size output too large
[00046пЅћ000060] : Add 15 Image [00046пЅћ000060].

I can set loop count about [00001пЅћ00015] = 1. [00016пЅћ00045] = 9, [00046пЅћ000060] = 1 ? or how to other resolve

Thanks!
Best regards,


Re: Issue set delay Frame in Convert to .gif

Post by Alex »

GIF file has only 1 parameter:
  • Loop count for ALL pages of file
GIF page also has only 1 parameter:
  • Delay for page
You should use the loop count if you can apply it for all pages of GIF file.

Best regards, Alexander


Page 1 from 1: 1