![]() |
[GR32] How to resize TBitmap32?
Hi, I have problem with TBitmap32 resizing :( Here is my code:
Delphi-Quellcode:
So, this only do well new size, can't correctly repaint old bitmap in new size and causes memory leak (large blocks). I have GR32 1.83. Could you help?
const
RESAMPLER: array [0..2] of TBitmap32ResamplerClass = (TNearestResampler, TLinearResampler, TDraftResampler ); var B: TBitmap32; begin with TResamplingSettings.Create(Image32.Bitmap.Width, Image32.Bitmap.Height) do begin if Execute then begin B := TBitmap32.Create; try RESAMPLER[2].Create(Image32.Bitmap); B.Resampler := Image32.Bitmap.Resampler; B.SetSizeFrom(Image32.Bitmap); B.Assign(Image32.Bitmap); Image32.Bitmap.SetSize(ImageWidth, ImageHeight); Image32.Bitmap.Draw(Rect(0, 0, Image32.Bitmap.Width, Image32.Bitmap.Height), Image32.Bitmap.BoundsRect, B ); finally B.Free; end; end; end; end; // TResamplingSettings - window, where can set new size // Image32 - component where is bitmap // ImageWidth, ImageHeight - properties from TResamplingSettings |
Re: [GR32] How to resize TBitmap32?
I am not familiar with TBitmap32, but when is this object being freed?
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:32 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz