B2024-060-Adding-a-picture-PROMS-crashes
This commit is contained in:
		| @@ -103,7 +103,7 @@ namespace Volian.Controls.Library | ||||
| 		public string TbFSwd | ||||
| 		{ | ||||
| 			get	{return tbFSWd.Text;} | ||||
| 			set { tbFSWd.Text = value; tbFSWd.Refresh(); trBarFS.Value = Convert.ToInt32(value); } | ||||
| 			set { tbFSWd.Text = value; tbFSWd.Refresh(); } //  trBarFS.Value = Convert.ToInt32(value); | ||||
| 		} | ||||
|  | ||||
| 		public string TbFSht | ||||
|   | ||||
| @@ -317,9 +317,13 @@ namespace Volian.Controls.Library | ||||
| 		} | ||||
| 		private void SetWidthsAndHeights(System.Drawing.Image img) | ||||
| 		{ | ||||
| 			int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) | ||||
|  | ||||
| 			double ht = (double)wd * aspectratio(img.Width, img.Height); | ||||
| 			int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) | ||||
| 			int ht = img.Height * MyStepPanel.DPI / 72; | ||||
|  | ||||
| 			//int wd = adjustimage(img.Width); // * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) | ||||
|  | ||||
| 			//double ht = (double)wd * aspectratio(img.Width, img.Height); | ||||
|  | ||||
| 			//int ht = adjustimage(img.Height); // * MyStepPanel.DPI / 72; | ||||
| 			if (MyItemInfo.MyContent.MyImage != null)   // image is null if creating new. | ||||
| @@ -327,8 +331,10 @@ namespace Volian.Controls.Library | ||||
| 				ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); | ||||
| 				if (!_pastedNew && ic != null && ic.Image_Height != 0) | ||||
| 				{ | ||||
| 					wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; | ||||
| 					ht = (double)wd * aspectratio(img.Width, img.Height); | ||||
| 					wd = ic.Image_Width * MyStepPanel.DPI / 72; | ||||
| 					ht = ic.Image_Height * MyStepPanel.DPI / 72; | ||||
| 					//wd = adjustimage(ic.Image_Width); // * MyStepPanel.DPI / 72; | ||||
| 					//ht = (double)wd * aspectratio(img.Width, img.Height); | ||||
| 					//ht = wd * (int)aspectratio(img.Width, img.Height); | ||||
| 					//ht = adjustimage(ic.Image_Height); // * MyStepPanel.DPI / 72; | ||||
| 				} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user