Page 1 of 1

Newbie questions.. please help!!

Posted: 2012-07-19T17:18:39-07:00
by 9tontruck
Hi guys

I am working on color tone shifting so playing with ICC/ICM profile. I have a ICM file and I need to embed it to a JPG file.
Below is my code:

Code: Select all

#include "Magick++.h"
using namespace Magick; 

Code: Select all

	char* img_name = "samsung.jpg";
	char* icm_name = "Samsung_to_Cannon.icm";

	Image image;
	image.read(img_name);  //read image

	Image icm;
	icm.read(icm_name);  //read color profile * I am not sure how to read ICM file
	
	Blob blobICM;
	blobICM = icm.iccColorProfile();  
	
	StringInfo *profile;  //StringInfo undefined

	MagickExport::SetImageProfile(&image, "icc", profile); //the global scope has no "SetImageProfile"		
		
	image.write("result.jpg");
MagickBooleanType SetImageProfile(Image *image,const char *name,
const StringInfo *profile)
from http://www.imagemagick.org/api/profile.php

First, I am not sure how to read ICM file and make a StringInfo object
Second, I don't have access to MagickExport::SetImageProfile function. It says the global scope has no "SetImageProfile"


Please help...

Re: Newbie questions.. please help!!

Posted: 2012-07-23T21:33:31-07:00
by anthony
A String info is just a structure containing a string (byte array), the allocated size and its current length. It is used when the string could contain zero or NUL characters