Skip to content

Commit

Permalink
Revert "Error en formato imágenes #2"
Browse files Browse the repository at this point in the history
This reverts commit 6739fda.
  • Loading branch information
LuisM000 committed Jun 7, 2018
1 parent 6739fda commit d4583bd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Net.Mime;
using System.Text;
Expand All @@ -18,7 +19,7 @@ public ImageOutputPropertiesBuilder()
imageOutputProperties = new ImageOutputProperties()
{
ImageDimensions = new ImageDimensions() { Resolution = new Size(1, 1) },
ImageFormat = System.Drawing.Imaging.ImageFormat.Png
ImageFormat = ImageFormat.Png
};
}

Expand Down
1 change: 0 additions & 1 deletion ImageGenerator.Core/ImageGenerator.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<Compile Include="Exceptions\FileAlreadyExistsException.cs" />
<Compile Include="Model\Images\FolderPath.cs" />
<Compile Include="Model\Images\ImageDimensions.cs" />
<Compile Include="Model\Images\ImageFormat.cs" />
<Compile Include="Model\Images\ImageOutputProperties.cs" />
<Compile Include="Model\Images\ImageName.cs" />
<Compile Include="Model\Images\ImageProperties.cs" />
Expand Down
23 changes: 0 additions & 23 deletions ImageGenerator.Core/Model/Images/ImageFormat.cs

This file was deleted.

3 changes: 1 addition & 2 deletions ImageGenerator.Core/Services/Images/ImageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public Image Resize(Image image, Size resolution)

public void SaveImage(Image image, OutputDescriptor outputDescriptor)
{
var outputFormat = outputDescriptor.ImageFormat ??
System.Drawing.Imaging.ImageFormat.Png;
var outputFormat = outputDescriptor.ImageFormat ?? ImageFormat.Png;
string pathWithExtension = string.Concat(outputDescriptor.Path, outputFormat.GetExtension());
if (!outputDescriptor.OverwriteFile && File.Exists(pathWithExtension))
throw new FileAlreadyExistsException(pathWithExtension);
Expand Down
1 change: 1 addition & 0 deletions ImageGenerator.Core/Services/Images/OutputDescriptor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Expand Down
4 changes: 2 additions & 2 deletions ImageGenerator.Core/Utils/ImageOutputPropertiesFactory.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Expand All @@ -12,8 +13,7 @@ public static class ImageOutputPropertiesFactory
{
public static IList<ImageOutputProperties> CreateForXamarin(string fileExtension, string rootPath)
{
ImageFormat imageFormat = ImageFormatExtension.GetImageFormat(fileExtension) ??
System.Drawing.Imaging.ImageFormat.Png;
ImageFormat imageFormat = ImageFormatExtension.GetImageFormat(fileExtension) ?? ImageFormat.Png;
return new List<ImageOutputProperties>()
{
new ImageOutputProperties()
Expand Down

0 comments on commit d4583bd

Please sign in to comment.