Fred's ImageMagick Scripts

A plethora of command-line scripts that perform geometric transforms, blurs, sharpens, edging, noise removal, and color manipulations.
makwana.ajay
Posts: 13
Joined: 2015-12-07T07:42:02-07:00
Authentication code: 1151

Re: Fred's ImageMagick Scripts

Post by makwana.ajay »

The above script has provided the junk value or something which I am not able to identify in the $out.
Outout is displayed as below in the $out
Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] =>
)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fred's ImageMagick Scripts

Post by fmw42 »

My guess is that your system has a problem with the unix utility sort.

Try these

<?php
exec("convert cnbc.jpg -format '%c' histogram:info:- 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

and

<?php
exec("convert cnbc.jpg -format '%c' histogram:info:- | sort -k 1 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

On what web site are you trying to make this work.
makwana.ajay
Posts: 13
Joined: 2015-12-07T07:42:02-07:00
Authentication code: 1151

Re: Fred's ImageMagick Scripts

Post by makwana.ajay »

The above script has provided the junk value or something which I am not able to identify in the $out.
Outout is displayed as below in the $out
Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] =>
)
makwana.ajay
Posts: 13
Joined: 2015-12-07T07:42:02-07:00
Authentication code: 1151

Re: Fred's ImageMagick Scripts

Post by makwana.ajay »

sorry last message is sent by mistake.
makwana.ajay
Posts: 13
Joined: 2015-12-07T07:42:02-07:00
Authentication code: 1151

Re: Fred's ImageMagick Scripts

Post by makwana.ajay »

I have found the different color listing in both script logic.
There are lots of colors listed. I am not getting the exact idea about it.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fred's ImageMagick Scripts

Post by fmw42 »

Read the Private Message I sent to you on this forum.
shalakolee
Posts: 1
Joined: 2016-11-03T09:42:28-07:00
Authentication code: 1151

Re: Fred's ImageMagick Scripts

Post by shalakolee »

this script fails for me,

when i do it i get this image... https://drive.google.com/file/d/0B7-1qC ... sp=sharing


I'm using the settings: -n 8 -p linear -t 2 -g 0 -f 0
the images are in the same folder as the script


the colorArr comes out as : #FFFFFF #0A0B0D #00A13A #5C4F94 #BA2342 #0070B6 #F5AD00 #E36612

would appreciate the help
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fred's ImageMagick Scripts

Post by fmw42 »

See my PM back to you. I cannot make it fail for me with your commands. What is your IM version and platform? Are you running it under PHP or directly from a terminal window? Are there any error messages? What is your full exact command line?
jamess
Posts: 1
Joined: 2017-05-15T07:51:46-07:00
Authentication code: 1151

Re: Fred's ImageMagick Scripts

Post by jamess »

Dear fred,

I tried this command and still getting output as pure black and white image no color, here is the output.



http://imgur.com/a/DGWhj

command i have used

embroidery cnbc.jpg output.jpg
above command is minimum which i used as i failed to get it working with all commands in ur site. always i get image without any color. only black and white.

i have changed the directory in script. i tried ur options but nothing works. my imagemagic is 6.7.2-7
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fred's ImageMagick Scripts

Post by fmw42 »

IM 6.7.2.7 is ancient and may have bugs or may not support the features used in the script. It is over 250 versions old. I suggest that you upgrade your version of IM.

I was able to go back to my old computer and run embroidery on IM 6.7.2.7 and it fails badly. I think it is an issue that I cannot fix. All temporary images were corrupt. So it is likely an issue with that version of IM and the commands I used or the IM MPC and MIFF formats. I do not know how to fix it for that old version. So you will need to upgrade your version of IM.

It does work for me using IM 6.7.6.10, the next oldest version I could test.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fred's ImageMagick Scripts

Post by fmw42 »

I do not think this will help for IM 6.7.2.7, but I thought I would notify others viewing this topic that I recently modified my embroidery script to fix a couple of bugs and add some enhancements.
Post Reply