Page 1 of 1
What's the fastest method for drawing one image over another?
Posted: 2017-04-16T02:29:34-07:00
by Airon65
Now I use:
Code: Select all
image2.compose( image1, x, y, Magick::OverCompositeOp );
Is there a faster way for drawing one image over another than the compose? I really need it
Image2 is always bigger than image1. Image1 places at the center of the image2.
ImageMagick 7.0.5-2 Q16 x86_64 2017-03-11
Re: What's the fastest method for drawing one image over another?
Posted: 2017-04-16T06:04:16-07:00
by snibgo
If the two images are close to the same size, I doubt if any other technique is much faster. If the images are very different sizes, perhaps another method such as DrawableCompositeImage is faster.
Re: What's the fastest method for drawing one image over another?
Posted: 2017-04-16T08:30:10-07:00
by Airon65
I've checked out these methods and they are give me following results on the same image:
Code: Select all
>>>>>> composite: 0.096247 sec.
>>>>>> DrawableCompositeImage: 0.758551 sec.
Seems that DrawableCompositeImage more than 7 times slower than composite one
I've checked it using 100 attempts for composite and DrawableCompositeImage.
My ENV is: macOS 10.12.3, poor Core2duo CPU (without CUDA enabled because I have integrated GPU
).