示例#1
0
        public void Resize(ZoomPercent aZoom)
        {
            MemoryStream stream = new MemoryStream();

            this.Save(stream, BitmapType.Bmp1, false, aZoom);
            stream.Seek(0L, SeekOrigin.Begin);
            this.Load(stream, BitmapType.Bmp1, true);
            stream.Close();
        }
示例#2
0
 internal static Bitmap GetThumbnailBmp(Bitmap fullSizeImage, ZoomPercent aZoomValue)
 {
     m_Zoom = aZoomValue;
     int height = fullSizeImage.Height;
     int width = fullSizeImage.Width;
     int aPreviewHeight = (int) (ZoomValue * height);
     int aPreviewWidth = (int) (ZoomValue * width);
     return GetThumbnailBmp(fullSizeImage, aPreviewWidth, aPreviewHeight);
 }
示例#3
0
        internal static Bitmap GetThumbnailBmp(Bitmap fullSizeImage, ZoomPercent aZoomValue)
        {
            m_Zoom = aZoomValue;
            int height         = fullSizeImage.Height;
            int width          = fullSizeImage.Width;
            int aPreviewHeight = (int)(ZoomValue * height);
            int aPreviewWidth  = (int)(ZoomValue * width);

            return(GetThumbnailBmp(fullSizeImage, aPreviewWidth, aPreviewHeight));
        }
示例#4
0
        public void Save(Stream stream, BitmapType type, bool withBorder, ZoomPercent aZoom)
        {
            Bitmap thumbnailBmp = GetThumbnail.GetThumbnailBmp(this.m_ImageDC, aZoom);

            this.Save(stream, type, withBorder, thumbnailBmp.Width, thumbnailBmp.Height, thumbnailBmp);
        }
示例#5
0
文件: InkBox.cs 项目: north0808/haina
 public void Save(Stream stream, BitmapType type, bool withBorder, ZoomPercent aZoom)
 {
     Bitmap thumbnailBmp = GetThumbnail.GetThumbnailBmp(this.m_ImageDC, aZoom);
     this.Save(stream, type, withBorder, thumbnailBmp.Width, thumbnailBmp.Height, thumbnailBmp);
 }
示例#6
0
文件: InkBox.cs 项目: north0808/haina
 public void Resize(ZoomPercent aZoom)
 {
     MemoryStream stream = new MemoryStream();
     this.Save(stream, BitmapType.Bmp1, false, aZoom);
     stream.Seek(0L, SeekOrigin.Begin);
     this.Load(stream, BitmapType.Bmp1, true);
     stream.Close();
 }