Skip to content

Commit

Permalink
Fixed double image bug
Browse files Browse the repository at this point in the history
Was calling the process image method twice to assign the tuple values item1 and 2 to variables.
Had to call the method once and store the returned tuple into a new tuple. I could then use this to create item1 and 2 variables without running the method twice.
  • Loading branch information
Ryason committed Feb 17, 2020
1 parent b6c8aff commit 0c9f072
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions DMCConverter/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,10 @@ public void ConvertButton_Click(object sender, EventArgs e)
}

//call the process image method the convert our image to DMC values and display the values on a grid
//store the returned dmc pixel array to recall them if user accidentally double clicks to remove.
dmcDataStore = ConvertImg.processImage(resized, selectedDMCValues, progressBar, DMCDataGrid).Item1;
rgbArray = ConvertImg.processImage(resized, selectedDMCValues, progressBar, DMCDataGrid).Item2;




//store the returned dmc pixel array and rgbArray to recall them if user accidentally double clicks to mark a grid cell
Tuple<string[,],Color[,]> tupleReturn = ConvertImg.processImage(resized, selectedDMCValues, progressBar, DMCDataGrid);
dmcDataStore = tupleReturn.Item1;
rgbArray = tupleReturn.Item2;
}

public void EnableDoubleBuffering()
Expand Down

0 comments on commit 0c9f072

Please sign in to comment.