Camera WM Purchase Order - crop disabled
This commit is contained in:
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.9.3142.0")]
|
||||
[assembly: AssemblyFileVersion("3.9.3142.0")]
|
||||
[assembly: AssemblyVersion("3.9.3143.0")]
|
||||
[assembly: AssemblyFileVersion("3.9.3143.0")]
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
||||
public partial class TestStartEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TestStartEndForm));
|
||||
private static readonly bool CropDisplayedImageToSquare = false;
|
||||
|
||||
const Unit unit = Unit.l;
|
||||
|
||||
@@ -1659,19 +1660,20 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
||||
|
||||
try
|
||||
{
|
||||
using (var tempBmp =
|
||||
new Bitmap(imageFileName))
|
||||
using (var tempBmp = new Bitmap(imageFileName))
|
||||
{
|
||||
Rectangle rect =
|
||||
CreateSquareCropRectangle(tempBmp);
|
||||
|
||||
using (Bitmap croppedImage =
|
||||
tempBmp.Clone(
|
||||
rect,
|
||||
tempBmp.PixelFormat))
|
||||
if (CropDisplayedImageToSquare)
|
||||
{
|
||||
lastImage =
|
||||
new Bitmap(croppedImage);
|
||||
Rectangle rect = CreateSquareCropRectangle(tempBmp);
|
||||
|
||||
using (Bitmap croppedImage = tempBmp.Clone(rect, tempBmp.PixelFormat))
|
||||
{
|
||||
lastImage = new Bitmap(croppedImage);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lastImage = new Bitmap(tempBmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1619,7 +1619,7 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(720, 738);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 101;
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
||||
@@ -3228,4 +3228,4 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
||||
private System.Windows.Forms.Label imageProcessingProgressLabel;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user