|
|
@ -50,13 +50,7 @@ namespace ImageSharp.Formats |
|
|
/// <returns>The options for the <see cref="JpegEncoder"/>.</returns>
|
|
|
/// <returns>The options for the <see cref="JpegEncoder"/>.</returns>
|
|
|
internal static IJpegEncoderOptions Create(IEncoderOptions options) |
|
|
internal static IJpegEncoderOptions Create(IEncoderOptions options) |
|
|
{ |
|
|
{ |
|
|
IJpegEncoderOptions jpegOptions = options as IJpegEncoderOptions; |
|
|
return options as IJpegEncoderOptions ?? new JpegEncoderOptions(options); |
|
|
if (jpegOptions != null) |
|
|
|
|
|
{ |
|
|
|
|
|
return jpegOptions; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return new JpegEncoderOptions(options); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|