microsoft / Lumia-imaging-sdk

Lumia Imaging SDK is a comprehensive set of GPU/CPU imaging tools and effects that run on both mobile and desktop, with high speed and memory efficiency. Samples and extras code are included.
MIT License
75 stars 37 forks source link

ImageSequencer sample missing line of code #19

Open NickDevoctomy opened 7 years ago

NickDevoctomy commented 7 years ago

I downloaded the current master and tried image sequencer. GifExporter crashes in the Export method on the line

int w = (int)info.ImageSize.Width;

info is null as it's not been set. All I did was to select an image set in the main menu then press the save button. To fix this I just fixed the if block above the aforementioned line so that it reads the following,

if (asyncImageResource == null)
{
    info = sanitizedImages[0] as IImageResource;
}
else
{
    info = await asyncImageResource.LoadAsync();
}

This got the sample working for me.

NickDevoctomy commented 7 years ago

No idea if that's how the sample is supposed to work though of course.