How to specify the endian (MSB or LSB) ?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

How to specify the endian (MSB or LSB) ?

Post by spok »

In magick++ there is a method to specify the endian.
Is there an equivalent with MagickWand ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

Use Magick::Options::endian( Magick::EndianType ) to set the endian value.
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

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

Post 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 ???
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

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

Post 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
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

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

Post 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 {};

User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

We got it wrong. You want Magick::Image::endian().
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

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

Post 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 ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

We'll need to add support for endian to MagickWand. Perhaps by this weekend.
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

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

Post 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++.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

We'll add support for shadow to Magick++ within the next few days.
Post Reply