Code: Select all
convert -density 300 -colorspace RGB cover.pdf -profile USWebCoatedSWOP.icc cover.jpg
Here is the code I am running:
Code: Select all
if( $isPdf ) {
MagickSetImageUnits( $magickWand, MW_PixelsPerInchResolution );
MagickSetResolution( $magickWand, 300, 300 );
}
MagickReadImage( $magickWand, $sourceFile );
if( MagickGetImageColorspace( $magickWand ) == MW_CMYKColorspace ) {
MagickRemoveImageProfile( $magickWand, "ICC" );
MagickSetImageProfile( $magickWand, 'ICC', file_get_contents( 'USWebCoatedSWOP.icc' ) );
MagickProfileImage($magickWand, 'ICC', file_get_contents( 'srgb.icm' ) );
MagickSetImageColorspace( $magickWand, MW_RGBColorspace );
}
Any thoughts?
Thanks.