My problem is that I need to set dpx:television.gamma, dpx:television.white_level and dpx:television.black_level. The first one works allright, but not the others. I have tried using diferent values, but always without succes. I heard that the value should be floating point, but I´m still without succes.
This is a short version of my program (just from the IM examples):
Code: Select all
#include <stdio.h>
#include <wand/magickwand.h>
int main(int argc,char **argv)
{
#define ThrowWandException(wand) \
{ \
char \
*description; \
\
ExceptionType \
severity; \
\
description=MagickGetException(wand,&severity); \
(void) fprintf(stderr,"%s %s %lu %s\n",GetMagickModule(),description); \
description=(char *) MagickRelinquishMemory(description); \
exit(-1); \
}
if (argc != 3){
(void) fprintf(stdout,"Usage: %s image thumbnail ICCprofile\n",argv[0]);
system("PAUSE");
exit(0);
}
MagickBooleanType status;
MagickWand *magick_wand;
/* Read an image. */
MagickWandGenesis();
magick_wand=NewMagickWand();
status=MagickReadImage(magick_wand, argv[1]);
if (status == MagickFalse)
ThrowWandException(magick_wand);
/* Turn the images into a thumbnail sequence. */
MagickResetIterator(magick_wand);
while (MagickNextImage(magick_wand) != MagickFalse){
MagickSetOption(magick_wand, "dpx:television.gamma","1.9"); // funciona
MagickSetOption(magick_wand, "dpx:television.white_level","95,0"); //no lo guarda
MagickSetOption(magick_wand, "dpx:television.black_level","685.0"); //no lo guarda
}
/* Write the image then destroy it. */
status=MagickWriteImages(magick_wand,argv[2],MagickTrue);
if (status == MagickFalse)
ThrowWandException(magick_wand);
magick_wand=DestroyMagickWand(magick_wand);
MagickWandTerminus();
system("PAUSE");
return(0);
}
Code: Select all
>identify -format "%[dpx:*]" img1.dpx
dpx:file.creator=ImageMagick 6.5.1-6 2009-04-22 Q16 OpenMP http://www.imagemagick.org
dpx:file.ditto.key=1
dpx:file.timestamp=2009-05-11T12:37:09+02:
dpx:file.version=V2.0
dpx:film.frame_position=0
dpx:film.held_count=0
dpx:film.sequence_extent=0
dpx:image.orientation=0
dpx:orientation.aspect_ratio=0x0
dpx:orientation.border=0x0+0+0
dpx:orientation.x_offset=0
dpx:orientation.x_size=0
dpx:orientation.y_offset=0
dpx:orientation.y_size=0
dpx:television.gamma=1.9
dpx:television.time.code=00:00:00:00
dpx:television.user.bits=00:00:00:00
Thanks for anyone who could help me!