Newbie questions.. please help!!

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
9tontruck
Posts: 2
Joined: 2012-07-19T17:13:06-07:00
Authentication code: 15

Newbie questions.. please help!!

Post 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...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newbie questions.. please help!!

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply