Skip to content

Commit

Permalink
Merge pull request #722 from JTOne123/master
Browse files Browse the repository at this point in the history
GifHelper InvariantCulture for doubles
  • Loading branch information
daniel-luberda authored Sep 7, 2017
2 parents b4dae98 + 80fcf4c commit ec55f44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/FFImageLoading.Touch/Helpers/GifHelper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Globalization;
using ImageIO;
using UIKit;
using FFImageLoading.Work;
Expand Down Expand Up @@ -61,12 +62,12 @@ private static List<int> GetDelays(CGImageSource source)
{
using (var unclampedDelay = gifProperties.ValueForKey(CGImageProperties.GIFUnclampedDelayTime))
{
double delayAsDouble = unclampedDelay != null ? double.Parse(unclampedDelay.ToString()) : 0;
double delayAsDouble = unclampedDelay != null ? double.Parse(unclampedDelay.ToString(), CultureInfo.InvariantCulture) : 0;

if (delayAsDouble == 0)
{
using (var delay = gifProperties.ValueForKey(CGImageProperties.GIFDelayTime))
delayAsDouble = delay != null ? double.Parse(delay.ToString()) : 0;
delayAsDouble = delay != null ? double.Parse(delay.ToString(), CultureInfo.InvariantCulture) : 0;
}

if (delayAsDouble > 0)
Expand Down

0 comments on commit ec55f44

Please sign in to comment.