N
Neeraj
hi
i am working on dicom image.this is code which gives exception on
"System.Drawing.Image imgInFile = System.Drawing.Image.FromStream(new
System.IO.MemoryStream(destPixels ) "
..The exception is "System.ArgumentException: Parameter is not valid."
could any body help me
i am waiting for help
regards,
Neeraj Kumar
protected internal virtual System.Drawing.Image scaleImage()
{
int scaledWidth = w / 2;
int scaledHeight = h / 2;
int index = 0;
int value_Renamed = 0;
byte[] destPixels = null;
this.pixData = dHR.data;
System.GC.Collect();
destPixels = new byte[scaledWidth * scaledHeight];
for (int i = 0; i < h; i += 2)
{
for (int j = 0; j < w; j += 2)
{
destPixels[index++] = (byte)pixData[(i * w) + j];
}
}
pixData = null;
Tools.gc("PIXDATA == NULL");
System.Drawing.Image imgInFile =
System.Drawing.Image.FromStream(new System.IO.MemoryStream(destPixels )
return imgInFile;
}
i am working on dicom image.this is code which gives exception on
"System.Drawing.Image imgInFile = System.Drawing.Image.FromStream(new
System.IO.MemoryStream(destPixels ) "
..The exception is "System.ArgumentException: Parameter is not valid."
could any body help me
i am waiting for help
regards,
Neeraj Kumar
protected internal virtual System.Drawing.Image scaleImage()
{
int scaledWidth = w / 2;
int scaledHeight = h / 2;
int index = 0;
int value_Renamed = 0;
byte[] destPixels = null;
this.pixData = dHR.data;
System.GC.Collect();
destPixels = new byte[scaledWidth * scaledHeight];
for (int i = 0; i < h; i += 2)
{
for (int j = 0; j < w; j += 2)
{
destPixels[index++] = (byte)pixData[(i * w) + j];
}
}
pixData = null;
Tools.gc("PIXDATA == NULL");
System.Drawing.Image imgInFile =
System.Drawing.Image.FromStream(new System.IO.MemoryStream(destPixels )
return imgInFile;
}