Search found 75 matches
- 2017-04-01T09:33:22-07:00
- Forum: Magick++
- Topic: Getting a pixel of an image
- Replies: 8
- Views: 27931
Re: Getting a pixel of an image
Instead of that I use this approach: for ( unsigned int j = 0; j < _height; j++ ) { for ( unsigned int i = 0; i < _width; i++ ) { Magick::Color c = image->pixelColor( i, j ); unsigned char r = c.quantumRed() * 255 / QuantumRange; unsigned char g = c.quantumGreen() * 255 / QuantumRange; unsigned char...
- 2017-03-31T19:34:03-07:00
- Forum: Magick++
- Topic: Getting a pixel of an image
- Replies: 8
- Views: 27931
Re: Getting a pixel of an image
getConstPixels() is declared in Image.h. It returns "PixelPacket *", which is not the same thing as "Quantum *". It doesn't look that it's the same thing: const MagickCore::PixelPacket *pixelsArr = image->getConstPixels( 0, 0, _imageWidth, _imageHeight ); first.cpp:723:36: error...
- 2017-03-31T19:14:22-07:00
- Forum: Magick++
- Topic: Getting a pixel of an image
- Replies: 8
- Views: 27931
Re: Getting a pixel of an image
In other words for RGB image I should go this way: const MagickCore::Quantum *pixelsArr = image->getConstPixels( 0, 0, _imgWidth, _imgHeight ); for ( unsigned int i = 0; i < _imgWidth * _imgHeight * 3; i += 3 ) { for ( unsigned int i1 = 0; i1 < 2; i1++ ) { unsigned char r = pixelsArr[ i + 0 ] * 255 ...
- 2017-03-31T19:06:27-07:00
- Forum: Magick++
- Topic: Getting a pixel of an image
- Replies: 8
- Views: 27931
Re: Getting a pixel of an image
Is the RGB order just goes like this in my pixelsArr?
and every R, G, B is of a quantum type
Code: Select all
R G B R G B R G B R G B....
- 2017-03-31T18:52:30-07:00
- Forum: Magick++
- Topic: Getting a pixel of an image
- Replies: 8
- Views: 27931
Re: Getting a pixel of an image
I've tried to read some docs on what's the Quantum is but the link to Quantum docs: http://www.imagemagick.org/Magick++/Quantum.html is broken.
- 2017-03-31T18:46:54-07:00
- Forum: Magick++
- Topic: Getting a pixel of an image
- Replies: 8
- Views: 27931
Getting a pixel of an image
I want to get some pixels from my image and print it out to the screen. My attempt is like this: const MagickCore::Quantum *pixelsArr = image1->getConstPixels( 0, 0, 800, 600 ); unsigned char r = pixelsArr[ 0 ].red * 255 / QuantumRange; unsigned char g = pixelsArr[ 0 ].greenQuantum * 255 / QuantumRa...
- 2017-03-29T21:04:45-07:00
- Forum: Magick++
- Topic: Can Magick++ work with YUV420P? (4:2:0)
- Replies: 1
- Views: 15635
Can Magick++ work with YUV420P? (4:2:0)
I've found some information about supported formats by IM (https://www.imagemagick.org/script/formats.php). There's some info about YUV 4:2:2 but nothing about 4:2:0. I want to create a video "on the fly" drawing each frame with Magick++ and encoding it with FFMPEG. The problem is FFMPEG w...
- 2017-03-29T03:56:20-07:00
- Forum: Magick++
- Topic: How to blur a text?
- Replies: 12
- Views: 29456
Re: How to blur a text?
I like it. Thanks in advance!Or trim the image after adding the text, then "extent" or border the image the image somewhat to allow for spreading by the blur.
- 2017-03-29T03:07:25-07:00
- Forum: Magick++
- Topic: How to blur a text?
- Replies: 12
- Views: 29456
Re: How to blur a text?
you should create the text as a separate image, blur it, and composite that over another image. I have some problem with the performance of this approach. It seems that ImageMagick blurs all pixels of big image not only the pixels of my text label. For example if we have: Magick::Image image2( Magi...
- 2017-03-28T21:12:00-07:00
- Forum: Magick++
- Topic: Is it possible to use GPU while working with Magick++?
- Replies: 3
- Views: 19002
Re: Is it possible to use GPU while working with Magick++?
I have installed ImageMagick with "--with-opencl" option enabled.
I've just found that I can use:
at the start of the app. Is that enough to run blur (and some other functions) using GPU? Seems that I doesn't see the difference of the performance
I've just found that I can use:
Code: Select all
Magick::EnableOpenCL();
- 2017-03-28T20:40:18-07:00
- Forum: Magick++
- Topic: Is it possible to use GPU while working with Magick++?
- Replies: 3
- Views: 19002
Is it possible to use GPU while working with Magick++?
I need to process many big images using Magick++. It's very hard work for CPU.
Is it possible to use GPU while working with Magick++?
It would be nice for the speed of processing those images
Is it possible to use GPU while working with Magick++?
It would be nice for the speed of processing those images
- 2017-03-28T18:44:44-07:00
- Forum: Magick++
- Topic: How to blur a text?
- Replies: 12
- Views: 29456
Re: How to blur a text?
Wow, it works! Thanks again!
- 2017-03-28T18:22:58-07:00
- Forum: Magick++
- Topic: How to blur a text?
- Replies: 12
- Views: 29456
Re: How to blur a text?
you should create the text as a separate image, blur it, and composite that over another image. Yeah, that's what I need. But I can't do it :) If I go that way: Magick::Image image( Magick::Geometry( 800, 600 ), Magick::Color( "white" ) ); image.font( "verdana" ); image.fontPoin...
- 2017-03-28T17:04:04-07:00
- Forum: Magick++
- Topic: How to blur a text?
- Replies: 12
- Views: 29456
Re: How to blur a text?
In other words I have a code: Magick::Image image( "any-image.png" ); image.font( "verdana" ); image.fontPointsize( 100 ); image.fillColor( Magick::Color( "maroon" ) ); image.strokeColor( Magick::Color( "red" ) ); image.strokeWidth( 2 ); image.draw( Magick::Dr...
- 2017-03-28T16:46:14-07:00
- Forum: Magick++
- Topic: How to blur a text?
- Replies: 12
- Views: 29456
Re: How to blur a text?
Thanks for the answer! Please provide example images and an example output or a description of what you want done to the images to produce the output. There are no images. Just a few text labels. I want to get one image with 3 text labels: one of that label should be blurred... But I can't just use:...