Hi All,
I would like to use wave operation on an image using magic++ api..After the wave operation the source image is resized because the virtual pixels are taken into account..This increases my image size and also gives me undesirable alpha information at the vertical edges of the image..How can I avoid this..I tried setting the virtual pixel method to TransparentVirtualPixelMethod but this does not seem to work..
Please help...
Ive attached this link which describes the problem....
http://docs.google.com/View?id=ddz3n2dw_0hs9zkdcj
The vertical edges of the result image(after wave operation) has alpha in the black regions which is undesirable..
Praveen
Using Wave operator on an image
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Using Wave operator on an image
The API wave function is the same as for the command line version exampled at
http://www.imagemagick.org/Usage/warping/#wave
The Wave function does not use -virtual-pixel, but simply fills the added area with the -background color that is assigned to the image it is given.
Set the background color of the image, then pass it to the wave function.
It will always add amplutide pixels to the top and bottom of the results, whcih you can then Crop or Extent off if that is not wanted.
So you have two solutions!
http://www.imagemagick.org/Usage/warping/#wave
The Wave function does not use -virtual-pixel, but simply fills the added area with the -background color that is assigned to the image it is given.
Set the background color of the image, then pass it to the wave function.
It will always add amplutide pixels to the top and bottom of the results, whcih you can then Crop or Extent off if that is not wanted.
So you have two solutions!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Using Wave operator on an image
Hi,
Thanx for the reply...
Ok, I get it..but doesn't the wave function take the background alpha into consideration while filling the added area...
Regards
Praveen
Thanx for the reply...
Ok, I get it..but doesn't the wave function take the background alpha into consideration while filling the added area...
Regards
Praveen