lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative pixel-based regtest checker


From: Werner LEMBERG
Subject: Re: Alternative pixel-based regtest checker
Date: Sun, 03 Mar 2013 08:06:39 +0100 (CET)

> I know from my Windows pixel-based checker that, generally, the PNG
> files contain the same image, version after version (there are a few
> oddities with some text, which I'm used to).  I would have believed
> that identical images would only be produced by identical PNG files?

Usually, picture container formats like PNG also contain metadata like
the date of image creation or a comment.  This makes PNGs different
even in case the contained images are identical.

Additionally, it's possible that identical images are stored in
different formats, for example, a B/W image can be stored either as a
1-bit bitmap or an 8-bit pixmap.

However, you could convert PNG images temporarily to the PGM format
to compute a hashsum: PGM doesn't have metadata.

  http://en.wikipedia.org/wiki/Netpbm_format

The program to do this is `pngtopnm', probably followed by a call to
`pgmtopgm' to assure that B/W images are handled as grayscale images
too:

  pngtopnm image.png \
  | pgmtopgm \
  | md5sum -b > image.md5


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]