Search found 75 matches

by Airon65
2017-04-21T07:42:49-07:00
Forum: Magick++
Topic: How to work with FX in Magick++?
Replies: 12
Views: 29840

Re: How to work with FX in Magick++?

This line:

Code: Select all

testImg.fx( "200" );
also leads to the broken image. In my case this only one line which is worked for me:

Code: Select all

testImg.fx( "rgb(255,255,0)" );
in this case I see a yellow image.
by Airon65
2017-04-21T07:18:15-07:00
Forum: Magick++
Topic: How to work with FX in Magick++?
Replies: 12
Views: 29840

Re: How to work with FX in Magick++?

Well.. I opened result file with the Photoshop but it can't be open with the standart macos viewer. I've just rebooted my computer but it still doesn't open. With the Photoshop I see only the first column painted with a black color and the other ones is painted with white color. I thought it should ...
by Airon65
2017-04-21T06:38:08-07:00
Forum: Magick++
Topic: How to work with FX in Magick++?
Replies: 12
Views: 29840

Re: How to work with FX in Magick++?

#include <iostream> #include <Magick++.h> int main( int argc, char **argv ) { Magick::InitializeMagick( *argv ); Magick::Image testImg( Magick::Geometry( 500, 500 ), Magick::Color( "white" ) ); testImg.fx( "i/2" ); testImg.write( "images/test-img.png" ); return 0; } Bu...
by Airon65
2017-04-21T06:34:31-07:00
Forum: Magick++
Topic: Getting a bunch of pixels leads me to segmentation fault...
Replies: 2
Views: 17395

Re: Getting a bunch of pixels leads me to segmentation fault...

But according to this article: https://www.imagemagick.org/Magick++/Pixels.html all should work fine but it doesn't
by Airon65
2017-04-21T06:26:15-07:00
Forum: Magick++
Topic: How to work with FX in Magick++?
Replies: 12
Views: 29840

Re: How to work with FX in Magick++?

Ok! I forgot to put my IM's version here, sorry. I use: ImageMagick 7.0.5-2 Q16 x86_64 2017-03-11, macOS 10.12.3 Code: Magick::InitializeMagick( *argv ); Magick::Image testImg( Magick::Geometry( 500, 500 ), Magick::Color( "white" ) ); testImg.fx( "i/w" ); testImg.write( "ima...
by Airon65
2017-04-20T16:13:21-07:00
Forum: Magick++
Topic: How to work with FX in Magick++?
Replies: 12
Views: 29840

How to work with FX in Magick++?

According to this article: https://www.imagemagick.org/script/fx.php and also this article: https://www.imagemagick.org/Usage/transform/index.html#fx I started with the simplest code which using FX-feature of IM: Magick::Image testImg( Magick::Geometry( 500, 500 ), Magick::Color( QuantumRange, Quant...
by Airon65
2017-04-20T15:14:51-07:00
Forum: Magick++
Topic: Getting a bunch of pixels leads me to segmentation fault...
Replies: 2
Views: 17395

Getting a bunch of pixels leads me to segmentation fault...

This simple code: Magick::Image *imagePtr = new Magick::Image( "images/horse.jpg" ); Magick::Pixels view( *imagePtr ); Magick::Quantum *pixels = view.get( 0, 0, imagePtr->columns(), imagePtr->rows() ); unsigned int r = 255 * QuantumScale * ( *( pixels + 0 ) ); gives me segmentation fault. ...
by Airon65
2017-04-20T12:35:57-07:00
Forum: Magick++
Topic: How to fill a primitive with a gradient color?
Replies: 10
Views: 29305

How to fill a primitive with a gradient color?

Is there a way to fill a primitive with a gradient color?
by Airon65
2017-04-19T16:28:39-07:00
Forum: Magick++
Topic: How to draw rotated image using DrawableCompositeImage and DrawableRotation?
Replies: 11
Views: 28296

Re: How to draw rotated image using DrawableCompositeImage and DrawableRotation?

snibgo wrote: 2017-04-19T15:47:59-07:00 The rotate primitive rotates subsequent shape primitives and text primitives about the origin of the main image.
Well, so can Magick++ rotate object around a specified anchor point of that object?
What's the origin of the main image? Is it the center of it?
by Airon65
2017-04-19T15:34:39-07:00
Forum: Magick++
Topic: How to draw rotated image using DrawableCompositeImage and DrawableRotation?
Replies: 11
Views: 28296

Re: How to draw rotated image using DrawableCompositeImage and DrawableRotation?

Why the rectangle changes its place? Is this normal behaviour or some sort of a bug?
by Airon65
2017-04-19T04:22:11-07:00
Forum: Magick++
Topic: How to draw rotated image using DrawableCompositeImage and DrawableRotation?
Replies: 11
Views: 28296

Re: How to draw rotated image using DrawableCompositeImage and DrawableRotation?

snibgo wrote: 2017-04-19T04:17:46-07:00 The horse has rotated once, by 75 degrees. That is what you asked for.

I can't see how much the rectangle has rotated.
But why the rectangle has the another place on the second image? I didn't change its coordinates...
by Airon65
2017-04-19T03:55:50-07:00
Forum: Magick++
Topic: How to draw rotated image using DrawableCompositeImage and DrawableRotation?
Replies: 11
Views: 28296

Re: How to draw rotated image using DrawableCompositeImage and DrawableRotation?

snibgo wrote: 2017-04-19T03:05:30-07:00
Airon65 wrote:I get twice-rotated scene!
What does that mean? Please show the result.
It means that the system rotates it once and then seems it rotates it twice
by Airon65
2017-04-19T03:52:44-07:00
Forum: Magick++
Topic: How to draw rotated image using DrawableCompositeImage and DrawableRotation?
Replies: 11
Views: 28296

Re: How to draw rotated image using DrawableCompositeImage and DrawableRotation?

The first code produces me next result:
Image
The second one is:
Image
by Airon65
2017-04-19T02:47:37-07:00
Forum: Magick++
Topic: How to draw rotated image using DrawableCompositeImage and DrawableRotation?
Replies: 11
Views: 28296

Re: How to draw rotated image using DrawableCompositeImage and DrawableRotation?

If I do something like this: Magick::Image horseImg( "images/horse.jpg" ); horseImg.rotate( 75 ); Magick::Image testImg( Magick::Geometry( 500, 500 ), Magick::Color( QuantumRange, QuantumRange, QuantumRange, QuantumRange ) ); std::vector < Magick::Drawable > objArr; double dash_array_8stro...
by Airon65
2017-04-19T02:44:02-07:00
Forum: Magick++
Topic: How to draw rotated image using DrawableCompositeImage and DrawableRotation?
Replies: 11
Views: 28296

How to draw rotated image using DrawableCompositeImage and DrawableRotation?

My code is: Magick::Image testImg( Magick::Geometry( 500, 500 ), Magick::Color( QuantumRange, QuantumRange, QuantumRange, QuantumRange ) ); std::vector < Magick::Drawable > objArr; double dash_array_8stroke_8fill[] = { 8, 8, 0 }; objArr.push_back( Magick::DrawableStrokeDashArray( dash_array_8stroke_...