Skip to content

Commit ec55f44

Browse files
Merge pull request #722 from JTOne123/master
GifHelper InvariantCulture for doubles
2 parents b4dae98 + 80fcf4c commit ec55f44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/FFImageLoading.Touch/Helpers/GifHelper.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using System.Globalization;
45
using ImageIO;
56
using UIKit;
67
using FFImageLoading.Work;
@@ -61,12 +62,12 @@ private static List<int> GetDelays(CGImageSource source)
6162
{
6263
using (var unclampedDelay = gifProperties.ValueForKey(CGImageProperties.GIFUnclampedDelayTime))
6364
{
64-
double delayAsDouble = unclampedDelay != null ? double.Parse(unclampedDelay.ToString()) : 0;
65+
double delayAsDouble = unclampedDelay != null ? double.Parse(unclampedDelay.ToString(), CultureInfo.InvariantCulture) : 0;
6566

6667
if (delayAsDouble == 0)
6768
{
6869
using (var delay = gifProperties.ValueForKey(CGImageProperties.GIFDelayTime))
69-
delayAsDouble = delay != null ? double.Parse(delay.ToString()) : 0;
70+
delayAsDouble = delay != null ? double.Parse(delay.ToString(), CultureInfo.InvariantCulture) : 0;
7071
}
7172

7273
if (delayAsDouble > 0)

0 commit comments

Comments
 (0)