Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory issues with certain Animated GIFs #1061

Merged
merged 7 commits into from
Jun 19, 2017
Merged

Conversation

anaisbetts
Copy link
Contributor

This PR fixes an issue where certain GIFs would immediately cause all available memory to be allocated, which Seems Bad

/cc @niik @shiftkey

</ItemGroup>
<ItemGroup>
<Compile Include="..\SolutionAssemblyInfo.cs">
<Link>Properties\SolutionAssemblyInfo.cs</Link>
</Compile>
<Compile Include="AnimatedGifWindow.cs" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So no Mono support for this? Or did this not work at all before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mono is only for building packages (aka --releasify), no changes here

get
{
// We need Windows 7 onwards ...
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth actually checking here? Or is the "no parents" approach Good Enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET 4.5. is >= Win7 only anyways, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎 👎 👎

}

this.WindowState = FormWindowState.Minimized;
Action size = () => { pictureBox.Width = this.Width; pictureBox.Height = this.Height; pictureBox.Left = 0; pictureBox.Top = 0; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg (lack of) indenting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs some cleanup, I kinda yolo'd out this code

@anaisbetts anaisbetts merged commit 63512c7 into master Jun 19, 2017
@anaisbetts anaisbetts deleted the winforms-gifs branch June 19, 2017 23:18
@shiftkey
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants