문제

How do I create gradients with ImageMagick in C++?

I am trying to create a visual representation of a WAV file.

I can create an Image with Magick++, draw in the waveform data and save the image as a .png file but it still looks a bit basic.

I'd like to give the image background and waveform gradients but I don't know how.

Are there any examples of how to create gradients using Magick++?

Many thanks, Josh

도움이 되었습니까?

해결책

I believe you would have to use the Pixel class and interpolate Colors to create your own gradient fill.

The manual for Magick++ does not indicate that it has native functions for gradient fill.

It may also be possible to use the core ImageMagick API for gradient fill.

Here's some useful links:

Edit - The Magick Core API does have a DrawGradientImage function which may help you out.

Here's some more useful links:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top