problem with exif data, change orientation info

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
luiie

problem with exif data, change orientation info

Post by luiie »

hello,

i have a problem to change the exif orientation info in a jpg file. input file jpg, output file jpg (scaled). here is some code:

char *Orientation;
MagickWand *MWand;

Orientation = MagickGetImageProperty (MWand, "EXIF:Orientation");
/*
change orientation, scale image
*/
Orientation = "1";
MagickSetImageProperty (MWand, "EXIF:Orientation", Orientation);
MagickWriteImage (MWand, PictureFile);

the PictureFile has the same exif data like the original file. thx for help, excuse my bad english!

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

Re: problem with exif data, change orientation info

Post by magick »

In about a week we are releasing ImageMagick 6.3.3-6. In it you will find MagickSetOrientation() and MagickSetImageOrientation(). Use it and it will automatically update your EXIF profile with the specified orientation.
luiie

Re: problem with exif data, change orientation info

Post by luiie »

hello again,

MagickSetImageOrientation is woking fine, thak you :D

regards, marko
Post Reply