Steve Ward | 1 Jul 05:21 2013
Picon

feature request: get available image comparison metrics

I wish there was a way to programatically get the image comparison metrics.

Example:

$ compare -list metric
AE
Fuzz
MAE
MEPP
MSE
NCC
PAE
PSNR
RMSE

$ gm compare -list metric
gm compare: Unrecognized option (-list).

$ compare --version
Version: ImageMagick 6.7.7-10 2013-02-25 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

$ gm compare -version
GraphicsMagick 1.3.16 2012-06-23 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2012 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
...

(Continue reading)

Kenneth Xu | 20 Jun 18:18 2013

Converting to PNG8 loses transparency

Hello,

This may be a dumb question but I did google as well as searching archive but cannot seem to find the answer. I'm trying to convert an PNG32 image to PNG8 using command below:

gm convert source.png png8:target.png

The command is useful to us as it reduces the image size to half but still yet good quality (see http://www.sitepoint.com/png8-the-clear-winner/). The problem is any transparency in source image is lost in the target image. The closest post I can find in the archive is this one: http://sourceforge.net/mailarchive/message.php?msg_id=20516411, but it was about creating an image. But that at least confirm that PNG8 in graphicsmagick can support transparency.Also, http://tinypng.org/ was able to do the same conversion but keeps the transparency intact, which means this is doable.

So what I'm doing wrong? Thank you in advance for you help.I can provide test images if needed.

Kenneth

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Graphicsmagick-tools mailing list
Graphicsmagick-tools <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-tools
Bob Friesenhahn | 1 Feb 04:07 2013
Picon
Picon

New GM "batch" command

Kenneth Xu contributed a 'gm batch' command which allows running any 
number of GM commands in a sequence with the commands being specified 
at a command line with 'GM> ' prompt, from standard input, or from a 
file.  This can improve the performance quite a lot with many small 
files, and allows the processing logic to be driven by a different 
program or script.

This new feature is included in Mercurial and the latest GM snapshot 
packages, including Windows installer packages.  Please provide 
feedback prior to the next release.

The following is the usage message from 'gm batch -help', which is all 
the documentation currently available.

Usage: gm batch [options ...] [file|-]

Where options include:
   -echo on|off         echo command back to standard out, default is off
   -escape unix|windows force use Unix or Windows escape format for command line
                        argument parsing, default is platform dependent
   -fail text           when feedback is on, output the designated text if the
                        command returns error, default is 'FAIL'
   -feedback on|off     print text (see -pass and -fail options) feedback after
                        each command to indicate the result, default is off
   -help                print program options
   -pass text           when feedback is on, output the designated text if the
                        command executed successfully, default is 'PASS'
   -prompt text         use the given text as command prompt. use text 'off' or
                        empty string to turn off prompt. default to 'GM> ' if
                        and only if batch mode was entered with no file argument
   -stop-on-error on|off
                        when turned on, batch execution quits prematurely when
                        any command returns error

Unix escape allows the use backslash(\), single quote(') and double quote(") in
the command line. Windows escape only uses double quote(").  For example,

     Orignal             Unix escape              Windows escape
     [a\b\c\d]           [a\\b\\c\\d]             [a\b\c\d]
     [Text with space]   [Text\ with\ space]      ["Text with space"]
     [Text with (")]     ['Text with (")']        ["Text with ("")"]
     [Mix: "It's a (\)"] ["Mix: \"It's a (\\)\""] ["Mix: ""It's a (\)"""]

Use '-' to read command from standard input without default prompt.

Bob
--

-- 
Bob Friesenhahn
bfriesen <at> simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
Bob Friesenhahn | 24 Dec 16:14 2012
Picon
Picon

testing

Test post to see if list is working.

Bob
--

-- 
Bob Friesenhahn
bfriesen <at> simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
Bob Friesenhahn | 17 Dec 03:13 2012
Picon
Picon

GM Windows 64-bit development snapshot available

The next GraphicsMagick release will offer 64-bit Windows binaries. 
In order to prepare, I have produced a first installer package.  If 
you have a Windows 64-bit system, please test this installer package 
to verify that GraphicsMagick runs ok and report if it does (or not). 
Please specify what type of Windows 64-bit OS you are using (I am 
using Windows 7).

The first snapshot installer package may be retrieved from

"ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/snapshots/GraphicsMagick-1.4.020121216-Q16-win64-dll.exe"

This first installer is very stripped in that it does not include 
PerlMagick, gmdisplay, or ImageMagickObject.

Note that 64-bit GraphicsMagick needs 64-bit Ghostscript.  32 and 
64-bit Ghostscript can be installed on the same system without harm 
(as can GraphicsMagick).

Bob
--

-- 
Bob Friesenhahn
bfriesen <at> simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
Ian Zimmerman | 27 Oct 04:02 2012

Suspect code in magick/floats.c


I just switched from a 32 bit machine to a 64 bit one, and this file
stopped compiling for me.  gcc complains about these lines:

MagickExport
int _Gm_convert_fp16_to_fp32 (const fp_16bits *fp16, float *fp32)
{
...
  if ((int)*fp16 != 0)

and also

MagickExport
int _Gm_convert_fp24_to_fp32 (const fp_24bits *fp24, float *fp32, const int mode)
{
...
  if ((int)*fp24 == 0)

I do not think these tests do what the author intended.  Here's a stupid
little test program I wrote to experiment:

#include <stdio.h>

typedef unsigned char a16[2];

void printit(const a16* p)
{
    printf("The answer is %d\n", (int)*p);
}

int main(void)
{
    unsigned char a32[4] = {0, 0, 0, 0};

    printit(a32);
}

This compiles only because I switch off the warnings-as-errors flag, and
the answer seems to be random - my guess is it is the bit pattern in the
pointer that gets printed, not what it points to.

In any case I hope you agree that the code is obscure at best and should
be rewritten with memcmp() or something.  It also seems to be just an
optimization, since the "not zero" branch following the test does the
right thing even if the source _is_ zero.  I simply removed the tests
(see attached patch), then it compiles cleanly and all tests still pass.

Attachment (floats.diff): text/x-diff, 2651 bytes

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
http://www.gravatar.com/avatar/c66875cda51109f76c6312f4d4743d1e.png
Rule 420: All persons more than eight miles high to leave the court.
------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Graphicsmagick-tools mailing list
Graphicsmagick-tools <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-tools
Matt Hurne | 11 Oct 19:13 2012

Apply tiled watermark to multiple images in a single process

I've scoured the web for a solution to the following problem, without success:

I would like to execute a single gm process to apply a tiled watermark
image to multiple images (which are the same image at various scales).
Currently, I execute one process per image, using commands like:

gm composite -tile watermark.png ORIG_MAX_400.jpg WM_MAX_400.jpg
gm composite -tile watermark.png ORIG_MAX_200.jpg WM_MAX_200.jpg
etc.

I've tried a plethora of commands in an attempt to achieve the same
result as the above commands in a single command, including variations
of gm mogrify, gm convert, and gm composite. The closest I've come was
when using the following command:

gm mogrify -output-directory out -create-directories -draw "image over
0,0 0,0 watermark.png" ORIG_MAX_*.jpg

In the case of that command, I end up with a watermarked version of
each of the input images, but the watermark isn't tiled.

Is there a way to achieve this? I considered issuing one gm composite
to watermark the original unscaled image and then a second command to
end up with all the scaled versions (that's how I get the
non-watermarked scaled images), but that will result in the watermark
itself being scaled in addition to the image, which isn't what I want.
My ultimate goal is to execute as few processes as possible; if it can
be done with more than one process but less than one per scaled image,
that will probably be sufficient for my needs.

Thanks!
Matt Hurne

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
Vladimir Moushkov | 28 Sep 14:16 2011
Picon

iOS compilation tool

Hi there,
For project I was developing I needed fast image processing library for iOS devices. Imagemagick is good but slow. Glad that I found GrahicsMagick. However there was no binaries for iOS or any cross compilation kits. I took the Claudio Marforio cross compilation script for ImageMagick and made to work for GraphicsMagick.
Hope it would be of help for some one.

Greets!

--------------------------------
In chaos I order

-----------------------------------------------------------------
100 лв БОНУС. Най-високи коефициенти. Tempobet.com
Attachment (mkmagick): application/octet-stream, 18 KiB
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Graphicsmagick-tools mailing list
Graphicsmagick-tools <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-tools
Ian Zimmerman | 19 Jun 22:44 2011

Clipping path?

Here's a bit of the gm manpage (this option would apply to the mogrify
and convert subcommands, at least).

 -clip  apply the clipping path, if one is present

        If a clipping path is present, it will be applied to subsequent operations.

        For example, if you type the following command:

             gm convert -clip -negate cockatoo.tif negated.tif

        only the pixels within the clipping path are negated.

        The  -clip  feature  requires the XML library.  If the XML library is not present, the
        option is ignored.

But but but ...

First, what is the "XML library", how do I know if it is present and
where do I get it if not present?

Second, what kind of thing is the clipping path?  A file - what file?
Environment variable?  Or what?  What information should be inside the
thing and in what format?

I suspect this bit has been mindlessly (or automatically) copy-pasted
from the API docs without considering the specific situation of the
command-line tool user.

--

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD 
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
Bob Friesenhahn | 7 Feb 01:56 2011
Picon
Picon

Obtaining original CMYK from PDF

The latest GM snapshot (and CVS) now supports returning CMYK from a 
PDF if it is invoked like

   gm convert -type ColorSeparation input.pdf output.tiff

The CMYK returned may or may not be the original CMYK since I notice 
that if the input PDF is in RGB colorspace, Ghostscript still returns 
CMYK.  Hopefully if the PDF is in a consistent CMYK colorspace, 
Ghostscript will produce CMYK in that colorspace (rather than some 
other CMYK space).

Testing is needed for this feature.

Bob
--

-- 
Bob Friesenhahn
bfriesen <at> simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
Bob Friesenhahn | 29 Jun 23:43 2010
Picon
Picon

GM -colors, -map, and -monochrome changes

For the next GM release, the 'mogrify' and 'convert' commands will 
respond immediately to the occurance of a -colors, -map, or 
-monochrome option on the command line.  In previous releases these 
were treated as file saving options and were invoked after all prior 
image processing operations had been performed.  Due to the change, 
the results may be different if a script requests additional image 
processing after a -colors, -map, or -monochrome option on the command 
line.

The changes were implemented inside the MogrifyImage() function, which 
is also used by some other GM commands so it is likely that there will 
be a change to other commands as well.  No changes were required to 
the test suite due to this change.

Please test the latest development snapshot and report any new issues 
encountered.

Thanks,

Bob
--

-- 
Bob Friesenhahn
bfriesen <at> simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

Gmane