public static Bitmap Honject2Bitmap(HObject hObject)
        {
            //获取图像尺寸
            HOperatorSet.GetImageSize(hObject, out HTuple width0, out _);
            //创建交错格式图像
            HOperatorSet.InterleaveChannels(hObject, out HObject InterImage, "rgb", 4 * width0, 0);
            //获取交错格式图像指针
            HOperatorSet.GetImagePointer1(InterImage, out HTuple Pointer, out _, out HTuple width, out HTuple height);
            IntPtr ptr = Pointer;

            InterImage.Dispose();
            //构建新Bitmap图像
            return(new Bitmap(width / 4, height, width, PixelFormat.Format24bppRgb, ptr));;
        }
示例#2
0
		public void LoadInterImage( string Path )
		{	
			
			//DisposePicBoxImage();
			// create new bitmap from path
			//RAWImage.ColorOrder.
			//RAWImage.Format.Interleaved
			InterImage inter = new InterImage();
			inter.LoadImage( Path );

			SetImageData( inter );
			 
			LoadImageHelper( inter.Images );
			this.filePath = Path;

			this.txtBoxMain.AppendText( inter.Header );
            FireFileLoaded();
		}