This is supposed to put text on the picture, in the center just above the bottom of the image:
so I do:
>...
>MagickAnnotateImage(magick_wand_copy,drawing_wand, (iw/2)+3,(ih-FontSize/2)+3,0,txt);
and it works.
but - when I do:
>MagickCropImage(magick_wand_copy, MagickGetImageWidth(magick_wand_copy), 700, 0, 130);
>...
>MagickAnnotateImage(magick_wand_copy,drawing_wand, (iw/2)+3,(ih-FontSize/2)+3,0,txt);
the text is to high.
Right now I am fixing it by inserting the following lines between Crop and Annodate:
>status=MagickSetImageFormat(magick_wand_copy,"bmp");
>m = MagickGetImageBlob(magick_wand_copy, &l);
>DestroyMagickWand(magick_wand_copy);
>magick_wand_copy = NewMagickWand();
>MagickSetImageFormat(magick_wand_copy,"bmp");
>MagickReadImageBlob(magick_wand_copy,m,l);
And - it works!
How can I avopid putting that extra code in ?
thanks
Roland
Annotate after Crop - unexpected x,y position
Re: Annotate after Crop - unexpected x,y position
Try MagickResetImagePage().
Re: Annotate after Crop - unexpected x,y position
MagickResetImagePage - not found
I am using ImageMagick-6.2.8-Q16
- I gues it's time to update
but - it will have to wait a little bit till I have time.
I am using ImageMagick-6.2.8-Q16
- I gues it's time to update
but - it will have to wait a little bit till I have time.
Re: Annotate after Crop - unexpected x,y position
Ok, use MagickSetImagePage(wand,0,0,0,0).
Re: Annotate after Crop - unexpected x,y position
Ok - I updated to the newest version (I work in CBuilder - so it's more work)
now it works! thanks
new problem now: MagickContrastStretchImage() does not work anymore
Where can I find the exact definition for the input parameters - Black_Point & White_Point ?
like - valid range ..... - I know the range is from 0 to QuantumRange
so MagickContrastStretchImage(0,QuantumRange) should not change the image - but that's not the case
thanks,
Roland
now it works! thanks
new problem now: MagickContrastStretchImage() does not work anymore
Where can I find the exact definition for the input parameters - Black_Point & White_Point ?
like - valid range ..... - I know the range is from 0 to QuantumRange
so MagickContrastStretchImage(0,QuantumRange) should not change the image - but that's not the case
thanks,
Roland
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Annotate after Crop - unexpected x,y position
See the recently added docs for the CLI API on -level
http://imagemagick.org/Usage/colors/#level
There is also a 'Levelize' type function that provides the reverse of 'Level' (equivelent to the new "+level" option in the latest release.
ContrastStretch function is basically a normalize type function, and not a good one at that! It hould be re-designed to mak use of Level, to adjust colors rather than histogram bins, as it currently does.
http://imagemagick.org/Usage/colors/#level
There is also a 'Levelize' type function that provides the reverse of 'Level' (equivelent to the new "+level" option in the latest release.
ContrastStretch function is basically a normalize type function, and not a good one at that! It hould be re-designed to mak use of Level, to adjust colors rather than histogram bins, as it currently does.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/