stream not needed
This commit is contained in:
commit
bd762cb5c9
|
@ -537,11 +537,10 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
//svg has no image and height, the attributes for svg are held in the XML viewport
|
//svg has no image and height, the attributes for svg are held in the XML viewport
|
||||||
if(file.Extension != "svg")
|
if(file.Extension != "svg")
|
||||||
{
|
{
|
||||||
if (Constants.ImageFiles.Split(',').Contains(file.Extension.ToLower()))
|
if (Constants.ImageFiles.Split(',').Contains(file.Extension.ToLower()))
|
||||||
{
|
{
|
||||||
FileStream stream = new FileStream(filepath, FileMode.Open, FileAccess.Read);
|
FileStream stream = new FileStream(filepath, FileMode.Open, FileAccess.Read);
|
||||||
|
|
||||||
using (var image = Image.FromStream(stream))
|
using (var image = Image.FromStream(stream))
|
||||||
{
|
{
|
||||||
file.ImageHeight = image.Height;
|
file.ImageHeight = image.Height;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user