Page 1 of 1

How to specify the endian (MSB or LSB) ?

Posted: 2012-01-30T15:50:04-07:00
by spok
In magick++ there is a method to specify the endian.
Is there an equivalent with MagickWand ?

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-30T17:29:29-07:00
by magick
Use Magick::Options::endian( Magick::EndianType ) to set the endian value.

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-30T22:38:54-07:00
by spok
magick wrote:Use Magick::Options::endian( Magick::EndianType ) to set the endian value.
hum... I get a message "use of non defined type "Magick::Options"
I see the class Options in Options.h but seems like it is not defined ???

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-30T23:51:22-07:00
by spok
In options.h there is the following comment...
Is it the reason I can't use it ???

Code: Select all

// This is an internal implementation class and is not part of the
// Magick++ API

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-31T00:02:54-07:00
by spok
I suspect the following error...

Compiler Error C2079
Error Message
'identifier' uses undefined class/struct/union 'name'
The specified identifier is an undefined class, structure, or union.

C2079 can also occur if you attempt to declare an object on the stack of a type whose forward declaration is only in scope.

Code: Select all

// C2079c.cpp
class A;

class B {
   A a;   // C2079
};

class A {};

Possible resolution:

// C2079d.cpp
// compile with: /c
class A;
class C {};

class B {
   A * a;
   C c;
};

class A {};


Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-31T06:37:42-07:00
by magick
We got it wrong. You want Magick::Image::endian().

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-31T09:06:56-07:00
by spok
magick wrote:We got it wrong. You want Magick::Image::endian().
Well this is for magick++. I have used the following code :

Code: Select all

Image p;
p.endian(LSBEndian);
p.read(filename);
And it works great, but now I'm looking for the equivalent when using magickwand...

I have the following code :

Code: Select all

MagickWand * pic = NewMagickWand();
// how indicate here the endian LSB ?
MagickReadImage(pic,filename);
How can I indicate the endian here ?

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-31T09:14:52-07:00
by magick
We'll need to add support for endian to MagickWand. Perhaps by this weekend.

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-31T10:27:11-07:00
by spok
OK. Thanks.
BTW, have you added support of shadow to Magick++ ?
because I'm using MagicWand just for the shadow function. For everything else I use Magick++.

Re: How to specify the endian (MSB or LSB) ?

Posted: 2012-01-31T10:41:58-07:00
by magick
We'll add support for shadow to Magick++ within the next few days.