EDN Admin
Well-known member
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; if (FramesToSave != <span style="color:Blue; null && FramesToSave.Contains(_frameId))
{
bitmap.RotateFlip(RotateFlipType.Rotate180FlipX);
bitmap.Save(Path.Combine(_outFolder, _frameId.ToString(<span style="color:#A31515; "D6") + <span style="color:#A31515; ".bmp"));
<span style="color:Green; // get histogram values
<span style="color:Blue; long[] HistogramValues = Form1.GetHistogram(bitmap);
<span style="color:Blue; if (histogramValuesList == <span style="color:Blue; null)
histogramValuesList = <span style="color:Blue; new List<<span style="color:Blue; long>();
histogramValuesList.AddRange(HistogramValues);
<span style="color:Blue; using (BinaryWriter binWriter =
<span style="color:Blue; new BinaryWriter(File.Open(fileName, FileMode.Create)))
{
<span style="color:Blue; for (<span style="color:Blue; int i = 0; i < histogramValuesList.Count; i++)
{
binWriter.Write(histogramValuesList[(<span style="color:Blue; int)i].ToString());
}
binWriter.Close();
}
}
[/code]
Something in the binWriter.Write isnt good ? Not suppose to write this way to the file ? The file is const in the top level class i called him: histogramValues.dat
View the full article
<span style="color:Blue; if (FramesToSave != <span style="color:Blue; null && FramesToSave.Contains(_frameId))
{
bitmap.RotateFlip(RotateFlipType.Rotate180FlipX);
bitmap.Save(Path.Combine(_outFolder, _frameId.ToString(<span style="color:#A31515; "D6") + <span style="color:#A31515; ".bmp"));
<span style="color:Green; // get histogram values
<span style="color:Blue; long[] HistogramValues = Form1.GetHistogram(bitmap);
<span style="color:Blue; if (histogramValuesList == <span style="color:Blue; null)
histogramValuesList = <span style="color:Blue; new List<<span style="color:Blue; long>();
histogramValuesList.AddRange(HistogramValues);
<span style="color:Blue; using (BinaryWriter binWriter =
<span style="color:Blue; new BinaryWriter(File.Open(fileName, FileMode.Create)))
{
<span style="color:Blue; for (<span style="color:Blue; int i = 0; i < histogramValuesList.Count; i++)
{
binWriter.Write(histogramValuesList[(<span style="color:Blue; int)i].ToString());
}
binWriter.Close();
}
}
[/code]
Something in the binWriter.Write isnt good ? Not suppose to write this way to the file ? The file is const in the top level class i called him: histogramValues.dat
View the full article