"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Pinta.Core/PaletteFormats/PaletteFormats.cs" between
pinta-1.7.tar.gz and pinta-1.7.1.tar.gz

About: Pinta is a powerful image drawing and editing program (modeled after Paint.NET).

PaletteFormats.cs  (pinta-1.7):PaletteFormats.cs  (pinta-1.7.1)
skipping to change at line 55 skipping to change at line 55
PaintShopProPalette pspHandler = new PaintShopProPalette (); PaintShopProPalette pspHandler = new PaintShopProPalette ();
formats.Add (new PaletteDescriptor ("PaintShop Pro", new string[] { "pal", "PAL" }, pspHandler, pspHandler)); formats.Add (new PaletteDescriptor ("PaintShop Pro", new string[] { "pal", "PAL" }, pspHandler, pspHandler));
} }
public IEnumerable<PaletteDescriptor> Formats { get { return form ats; } } public IEnumerable<PaletteDescriptor> Formats { get { return form ats; } }
public IPaletteLoader GetLoaderByFilename (string fileName) public IPaletteLoader GetLoaderByFilename (string fileName)
{ {
string extension = System.IO.Path.GetExtension (fileName) ; string extension = System.IO.Path.GetExtension (fileName) ;
extension = NormalizeExtension (extension); extension = NormalizeExtension (extension);
return formats.Where (p => p.Extensions.Contains (extensi on)).FirstOrDefault ().Loader; return formats.Where (p => p.Extensions.Contains (extensi on)).FirstOrDefault ()?.Loader;
} }
private static string NormalizeExtension (string extension) private static string NormalizeExtension (string extension)
{ {
return extension.ToLowerInvariant ().TrimStart ('.').Trim (); return extension.ToLowerInvariant ().TrimStart ('.').Trim ();
} }
} }
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)