Hi all,
I have some problem with SparseColor().
I had download latest version and i took libraries and includes and builded project in VC++ to get .NET dll.
All methods are working fine and i am able to access all methods, but SparseColor is giving exception when i called.
"Sparse color image, given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods."
Syntax:
SparseColor (ChannelType channel_, SparseColorMethod method_, unsigned long number_arguments, double *arguments_ );
Example:
ImageMagickNET.Image imageMagick = new ImageMagickNET.Image( "C:\\img1.jpg" );
double dArguments=10;
double *pArguments=&dArguments;
imageMagick.SparseColor(ChannelType.BlueChannel,SparseColorMethod.BarycentricColorInterpolate,(uint)1, pArguments );
The above example is giving exception like "External component has thrown an exception."
Can you tell me how to solve this problem.
Even it is not working in command prompt also
My code::
C:\Program Files\ImageMagick-6.5.8-Q16> convert -size 100x100 xc: -sparse-color Bilinear '30,10 red 10,80 blue 70,60 lime 80,20 yellow' -fill white -stroke black -draw 'circle 30,10 30,12 circle 10,80 10,82' -draw 'circle 70,60 70,62 circle 80,20 80,22' C:\sam\sas.jpg
I am getting Errors like::
convert: invalid argument for option `sparse-color': Invalid number of Arguments
@ mogrify.c/SparseColorOption/456.
convert: unable to open image `red': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `10,80': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `blue': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `70,60': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `lime': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `80,20': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `yellow'': No such file or directory @ blob.c/OpenBlob/2480.
convert: Non-conforming drawing primitive definition `circle' @ draw.c/DrawImage/3140.
convert: unable to open image `30,10': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `30,12': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `circle': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `10,80': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `10,82'': No such file or directory @ blob.c/OpenBlob/2480.
convert: Non-conforming drawing primitive definition `circle' @ draw.c/DrawImage/3140.
convert: unable to open image `70,60': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `70,62': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `circle': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `80,20': No such file or directory @ blob.c/OpenBlob/2480.
convert: unable to open image `80,22'': No such file or directory @ blob.c/OpenBlob/2480.
convert: Non-conforming drawing primitive definition `circle' @ draw.c/DrawImage/3140.
please help me.
Thanks
venkat
SparseColor is not working
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: SparseColor is not working
This works for me on IM 6.5.8-6 Q16 Mac OSX Tiger.
convert -size 100x100 xc: -sparse-color Bilinear \
'30,10 red 10,80 blue 70,60 lime 80,20 yellow' \
-fill white -stroke black -draw 'circle 30,10 30,12 circle 10,80 10,82' \
-draw 'circle 70,60 70,62 circle 80,20 80,22' \
tmp1.png
Note Bilinear requires 4 points or it reverts to Barycentric. See http://www.imagemagick.org/script/comma ... arse-color
I don't see anything wrong, unless your IM install is bad. Try using double quotes rather than single quotes on windows. See http://www.imagemagick.org/Usage/windows/ for numerous differences with Unix and Windows syntax.
convert -size 100x100 xc: -sparse-color Bilinear \
'30,10 red 10,80 blue 70,60 lime 80,20 yellow' \
-fill white -stroke black -draw 'circle 30,10 30,12 circle 10,80 10,82' \
-draw 'circle 70,60 70,62 circle 80,20 80,22' \
tmp1.png
Note Bilinear requires 4 points or it reverts to Barycentric. See http://www.imagemagick.org/script/comma ... arse-color
I don't see anything wrong, unless your IM install is bad. Try using double quotes rather than single quotes on windows. See http://www.imagemagick.org/Usage/windows/ for numerous differences with Unix and Windows syntax.
Re: SparseColor is not working
Hi
Thanks for replay and thank you for given suggestion.
I changed single quotes to double quotes in windows, it is working for me also.
but i want to work with .net dll.
can help me to work with .Net dll?
Thanks
Thanks for replay and thank you for given suggestion.
I changed single quotes to double quotes in windows, it is working for me also.
but i want to work with .net dll.
can help me to work with .Net dll?
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: SparseColor is not working
sorry I don't know anything about Windows or .Net. I am a Mac person.
Re: SparseColor is not working
Thank you very much for your co-operationfmw42 wrote:sorry I don't know anything about Windows or .Net. I am a Mac person.
Re: SparseColor is not working
can anyone tell me how to access SparseColor with .NET wrapper?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: SparseColor is not working
try posting to the Users or Windows forums at index.php
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: SparseColor is not working
My guess is that it probably has not been folded into that API as it is relatively new to command line.
Re: SparseColor is not working
No it is folded into API.fmw42 wrote:My guess is that it probably has not been folded into that API as it is relatively new to command line.
I took latest version and i created C++ method to access SparseColor what ever params are specified in "Image.h".
// Sparse color image, given a set of coordinates, interpolates the colors
// found at those coordinates, across the whole image, using various
// methods.
void sparseColor ( const ChannelType channel,
const SparseColorMethod method,
const unsigned long number_arguments,
const double *arguments );