Page 1 of 1

Very vivid images

Posted: 2010-09-27T23:38:37-07:00
by journeyman73
Hi,
when i process my tif images they come out very vivid ie greens that should look like leaves are almost glowing.
this is the process

Code: Select all

# Preserve colour profiles? (omit for smaller sizes)   
            $profile="+profile \"*\" -colorspace RGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)
            if ($imagemagick_preserve_profiles && $id!="thm" && $id!="col" && $id!="pre" && $id!="scr") {$profile="";}

            $runcommand = $command ." +matte $profile -resize " . $tw . "x" . $th . "\">\" ".escapeshellarg($path);
            $output=shell_exec($runcommand);  
            # echo $runcommand."<br>";
            # Add a watermarked image too?
            global $watermark;
            if (isset($watermark) && ($ps[$n]["internal"]==1 || $ps[$n]["allow_preview"]==1))
               {
               $path=get_resource_path($ref,true,$ps[$n]["id"],false,"",-1,1,true);
               if (file_exists($path)) {unlink($path);}
               
               $watermarkreal=dirname(__FILE__) ."/../" . $watermark;
               
               $runcommand = $command ." +matte $profile -resize " . $tw . "x" . $th . "\">\" -tile ".escapeshellarg($watermarkreal)." -draw \"rectangle 0,0 $tw,$th\" ".escapeshellarg($path); 
               
               #die($runcommand);
               $output=shell_exec($runcommand); 
               # echo $runcommand;
               }
            }
         }
anybody know a good way of calming down the colour
Cheers
Kev

Re: Very vivid images

Posted: 2010-09-28T00:03:01-07:00
by anthony
You could try NOT removing the profile, but modifying the profile to RGB space!

See IM examples, Color Profiles
http://www.imagemagick.org/Usage/formats/#color_profile

Re: Very vivid images

Posted: 2010-09-28T03:27:10-07:00
by Drarakel
@journeyman73:
So.. Were you now able to update the ImageMagick version?
-> viewtopic.php?f=1&t=16924
:wink:

Re: Very vivid images

Posted: 2010-09-28T05:30:56-07:00
by journeyman73
nope, just working around the problems, arrrrrrrgh

Re: Very vivid images

Posted: 2010-09-28T07:38:43-07:00
by journeyman73
these are the images created when it converts cmyk to rgb
Image
but if they are already rgb i get
Image
Which is the correct colour

I've tried so much but i get no where, anybody know what i can do

The hosting is running
Version: ImageMagick 6.4.3 2008-08-28 Q16 http://www.imagemagick.org
and my command line is
$profile="+profile \"*\" -bordercolor white -border 1x1 -colorspace RGB -shave 1x1"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)

Re: Very vivid images

Posted: 2010-09-28T12:30:15-07:00
by Drarakel
journeyman73 wrote:I've tried so much but i get no where, anybody know what i can do
What exactly did you try so far? You didn't respond anymore in the old thread..
Did you read Anthony's ImageMagick documentation about color profiles?

Doing good colorspace conversions with color profiles is not a task that is done by replacing just a simple option in your code. You will have to read about this topic and better try some simple commands first, so that you get used to that.
An example - if you have a CMYK input image with embedded CMYK profile, then all you need is the destination profile (e.g. a sRGB profile), and then use something like this:
convert <input> -profile sRGB.icc <output>
But that's already covered by the documentation. If you have read that and there are still problems, then try to describe where exactly is that problem.

Re: Very vivid images

Posted: 2010-09-29T08:08:18-07:00
by journeyman73
Ok, i have re read the profiles stuff and got it working
cheers
guys, sorry for being a pain, just took me a while to get my head around it
Kev