Very vivid images

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
journeyman73

Very vivid images

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

Re: Very vivid images

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Very vivid images

Post by Drarakel »

@journeyman73:
So.. Were you now able to update the ImageMagick version?
-> viewtopic.php?f=1&t=16924
:wink:
journeyman73

Re: Very vivid images

Post by journeyman73 »

nope, just working around the problems, arrrrrrrgh
journeyman73

Re: Very vivid images

Post 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)
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Very vivid images

Post 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.
journeyman73

Re: Very vivid images

Post 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
Post Reply