Skip to content

Commit

Permalink
Merge pull request ShokoAnime#96 from maxpiva/master
Browse files Browse the repository at this point in the history
Fix Thumbnails on machines with the comma as decimal separator. Parsing ...
  • Loading branch information
jmediamanager committed Nov 10, 2014
2 parents 19acac7 + a93ca9b commit 91de5dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion JMMServer/JMMServiceImplementationREST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Security.Cryptography.X509Certificates;
Expand Down Expand Up @@ -500,7 +501,7 @@ public System.IO.Stream GetThumb(string ImageType, string ImageID, string Ratio)
if (m != null)
{
float newratio = 0F;
if (float.TryParse(Ratio, out newratio))
if (float.TryParse(Ratio, NumberStyles.Any, CultureInfo.InvariantCulture, out newratio))
{
Image im = Image.FromStream(m);
float calcwidth = im.Width;
Expand Down

0 comments on commit 91de5dc

Please sign in to comment.