I would like to draw on images to create custom gadgets. The problem I have is that resizing images is very slow on large images or with many images at once. The problem appears to be caused by the scaling of the old pixels. In my case I only need to change the image dimensions. My gadgets will redraw every pixel new at the correct scale.
I'm currently using CreateImage() to recreate the image which is much faster but this does not feel like an optimal approach. A flag for ResizeImage() that prevents it from scaling would be nice.
ResizeImage without scaling the image
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
> but this does not feel like an optimal approach.
it is the optimal approach. ResizeImage() is made for scaling.
stop thinking OOP.
sure, an Image is an object, but not damned to be bound to your Gadget.
PS:
imagine what happenes if you shrink an Image - The Image has to be recreated, to free the obsolete memory.
it is the optimal approach. ResizeImage() is made for scaling.
stop thinking OOP.
sure, an Image is an object, but not damned to be bound to your Gadget.
PS:
imagine what happenes if you shrink an Image - The Image has to be recreated, to free the obsolete memory.
oh... and have a nice day.