Search found 75 matches

by Airon65
2017-04-18T07:48:39-07:00
Forum: Magick++
Topic: How to use DrawableSkewX/Y?
Replies: 1
Views: 15697

How to use DrawableSkewX/Y?

I test it using following code: Magick::Image testImg( "images/horse.jpg" ); testImg.strokeColor( "red" ); testImg.fillColor( Magick::Color( QuantumRange, QuantumRange, QuantumRange, 0 ) ); testImg.strokeWidth( 2 ); testImg.draw( Magick::DrawableSkewY( 50 ) ); testImg.draw( Magic...
by Airon65
2017-04-18T07:03:24-07:00
Forum: Magick++
Topic: You have an error in the documentation
Replies: 1
Views: 16735

You have an error in the documentation

https://www.imagemagick.org/Magick++/Drawable.html DrawableRoundRectangle double centerX_, double centerY_, double width_, double hight_, double cornerWidth_, double cornerHeight_ centerX, centerY - it's not the center. It's just the leftTop position. hight_ - misspelling (height). width, height - i...
by Airon65
2017-04-16T08:30:10-07:00
Forum: Magick++
Topic: What's the fastest method for drawing one image over another?
Replies: 2
Views: 16124

Re: What's the fastest method for drawing one image over another?

I've checked out these methods and they are give me following results on the same image: >>>>>> 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 ...
by Airon65
2017-04-16T02:29:34-07:00
Forum: Magick++
Topic: What's the fastest method for drawing one image over another?
Replies: 2
Views: 16124

What's the fastest method for drawing one image over another?

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
by Airon65
2017-04-10T05:05:19-07:00
Forum: Magick++
Topic: How to draw a circle with a specified radius?
Replies: 1
Views: 17090

How to draw a circle with a specified radius?

As the documentation says: DrawableCircle double originX_, double originY_, double perimX_, double perimY_ Draw a circle using the stroke color and thickness using specified origin and perimeter coordinates. If a fill color is specified, then the object is filled. As the Math says: Perimeter of a ci...
by Airon65
2017-04-08T20:08:27-07:00
Forum: Magick++
Topic: Problem with Shadow. It doesn't show
Replies: 5
Views: 19076

Re: Problem with Shadow. It doesn't show

Thanks for the explanation! Now I've got it. I believed that there is a easier way for achieving it :)
by Airon65
2017-04-08T09:29:19-07:00
Forum: Magick++
Topic: Problem with Shadow. It doesn't show
Replies: 5
Views: 19076

Re: Problem with Shadow. It doesn't show

I see the white label only. The shadow is the current background colour. You haven't set this, so you get the default, which is white. You get what you asked for: a white shadow. If you want to put a shadow behind the original image, you need another step, which is show (in command-line form) at ht...
by Airon65
2017-04-08T04:40:01-07:00
Forum: Magick++
Topic: Problem with Shadow. It doesn't show
Replies: 5
Views: 19076

Problem with Shadow. It doesn't show

My piece of code: Magick::Image img5( Magick::Geometry( 600, 600 ), Magick::Color( QuantumRange, QuantumRange, QuantumRange, 0 ) ); img5.font( "Verdana" ); img5.fontPointsize( 50 ); img5.fillColor( Magick::Color( "maroon" ) ); img5.strokeColor( Magick::Color( "red" ) );...
by Airon65
2017-04-05T01:27:31-07:00
Forum: Magick++
Topic: How to use textGravity?
Replies: 4
Views: 18152

Re: How to use textGravity?

I have a strange problem. Why this code doesn't work? std::cout << "Size: " << img5.columns() << "x" << img5.rows() << "\n"; img5.textGravity( MagickCore::CenterGravity ); img5.draw( Magick::DrawableText( 100 - ( img5.columns() / 2 ), 0, "Some text!" ) ); It r...
by Airon65
2017-04-05T00:37:28-07:00
Forum: Magick++
Topic: How to use textGravity?
Replies: 4
Views: 18152

Re: How to use textGravity?

Well... instead of it I've just developed a formula :)

Code: Select all

img5.textGravity( MagickCore::CenterGravity );
img5.draw( Magick::DrawableText( 100 - ( w / 2 ), 200 - ( h / 2 ),  "Some text!" ) );
it places a text at the 100x200 by center of it. (anchor point at the center of a text).
by Airon65
2017-04-05T00:01:29-07:00
Forum: Magick++
Topic: How to use textGravity?
Replies: 4
Views: 18152

Re: How to use textGravity?

Hm... yeah looks like it works like this :) That's not what I was looking for :) Is it possible to align the text at the center of given coordinates? I mean something like: anchorPointX = 0.5f, anchorPointY = 0.5f. When I use that command: img5.draw( Magick::DrawableText( 100, 200, "Some text!&...
by Airon65
2017-04-04T20:35:32-07:00
Forum: Magick++
Topic: How to use textGravity?
Replies: 4
Views: 18152

How to use textGravity?

My attempt is: int w = 800, h = 600; Magick::Image img5( Magick::Geometry( w, h ), Magick::Color( "white" ) ); img5.font( "ComicSans" ); img5.fontPointsize( 50 ); img5.fillColor( Magick::Color( "maroon" ) ); img5.strokeColor( Magick::Color( "red" ) ); img5.str...
by Airon65
2017-04-02T11:13:51-07:00
Forum: Magick++
Topic: What's the fastest method for accessing to pixel color?
Replies: 5
Views: 21213

Re: What's the fastest method for accessing to pixel color?

Is that right that in case of my RGB image: Magick::Image *image = new Magick::Image(); image->size( Magick::Geometry( _imgWidth, _imgHeight ) ); image->backgroundColor( Magick::Color( "white" ) ); image->erase(); I get 4 bytes per pixel: Magick::Pixels view( *image ); for ( unsigned int j...
by Airon65
2017-04-02T10:17:48-07:00
Forum: Magick++
Topic: What's the fastest method for accessing to pixel color?
Replies: 5
Views: 21213

Re: What's the fastest method for accessing to pixel color?

Thanks! That approach works really fast!
by Airon65
2017-04-02T00:10:01-07:00
Forum: Magick++
Topic: What's the fastest method for accessing to pixel color?
Replies: 5
Views: 21213

What's the fastest method for accessing to pixel color?

Now I use following approach for accessing to image pixel colors: unsigned short _imgWidth = 1920, _imgHeight = 1080; Magick::Image *image = new Magick::Image(); image->size( Magick::Geometry( _imgWidth, _imgHeight ) ); image->backgroundColor( Magick::Color( "white" ) ); image->erase(); fo...