On 9/5/2021 9:40 AM, Henning Hraban Ramm via ntg-context wrote:


Am 04.09.2021 um 19:06 schrieb Hans Hagen <j.ha...@xs4all.nl>:

On 9/4/2021 2:18 PM, Henning Hraban Ramm via ntg-context wrote:

I guess it’s on me to write a wiki page about GM.

you can then also add some comparison with im (i.e. what does it offer more 
than gm)

Oh no...

IM and GM have a history, and I don’t want to get involved.

GM accuses IM of security issues, feature and dependency bloat, bad code 
quality, inefficiency, frequent API changes, license changes and whatnot.

ah, i think i remember ... i switched to gm just because im didn't run well at that time on windows

personally i think that "accuses of .." show that down side of the open source community (which includes the tex community btw) ... it gets even worse when something sells itself for big money and then after a few years spins off again attacking those who paid them ... i suppose that unconstrianed social media also play a role in this (one reason why i'm not really interested in discussions around this in public)

like: what is bad code quality ... i bet one can find examples of bad, inefficient, etc in gm too (it would be quite a claim to say one can't), and the more people touch the code ... also, what about the code quality of libs then ... one bug in those could affect lots of programs using them ... most is about trust .. and even more in 'working with people you like working with'

btw, 'bug' and 'many bugs' and 'big bug' are popular in subject titles and mail bodies, even it's small bugs or side effects or something that has to be tested but it might make people feel good

'security fix' is another one, which often just means: programming error e.g. array out of bounds; nowadays for me the way an email is written determines the reading order, but there is no good filter for that yet; same for (tech) websites: bluffing and barking agianst a tree (like your mentioned 'accuses' makes me go away immediately and discard whatever would follow)

(what to think of: https://www.youtube.com/watch?v=BhTQyeEdnzs)

OTOH IM offers much more features (e.g. the geometric transformations I 
inquired about), and you can find lots of interesting examples (including the 
scripts Bruce mentioned). I couldn’t find another CLI tool that can do most of 
these things, at least not with much more programming.

ok, i'll have a look later, maybe it can be compiled lean-and-mean

Dependencies according to MacPorts:

Full Name: GraphicsMagick @1.3.36_1+q8
Library Dependencies: libxml2, bzip2, xz, zlib, libpng, tiff, freetype, 
libiconv, libtool, lcms2, jasper, libjpeg-turbo, webp

makes me wonder if there is some simple image manipulation lib that just deals with the pixels .. we don't need xml, freetype, libiconv, ...

Full Name: ImageMagick @6.9.11-60_1+x11
Library Dependencies: bzip2, djvulibre, xz, jbigkit, libjpeg-turbo, lcms2, 
libpng, libraw, tiff, webp, zlib, fftw-3, freetype, fontconfig, ghostscript, 
libiconv, libtool, openjpeg, openexr, expat, libxml2, libheif, pkgconfig, 
xorg-libX11, xorg-libXext, xorg-libXt
Runtime Dependencies: urw-fonts

hm, that looks bad ... maybe not have a look after all ... i get the impression that many originally small programs get bloated by pulling in one lib that then pulls in more, even if nothing of that is used or useful to the task (we sort of had that when luatex used xpdf from which we only need the reading part but we could not really complain about that because it has been so from the start but it triggered quite a bit of updating)

keep in mind that we can just call them as programs using os.execute (or the filter module or ...) ... no need to waste time in integration (apart from a fun aspect)

It’s probably not wise to run IM in a web server process for security and 
efficiency reasons, but if I run it only on my own computer there shouldn’t be 
a problem.

hm, why not? all it does in the end is "bits in - bits out"


BTW, here’s my script:


#!/bin/bash
#INPUT=$1

OUTPUT=${INPUT/.JPG/.png}
OUTPUT=${OUTPUT/.jpg/.png}
OUTPUT=${OUTPUT/in\//out\/}

# random rotation ±1.5˚
ROTATION=`jot -r 1 -1.5 1.5`
echo $OUTPUT ${ROTATION}˚

# downscale, add a white border and a shadow, rotate, move down, add a piece of 
tape (tesa1.png), grayscale
convert "$INPUT" \
-auto-orient \
-resize 800x800 \
-bordercolor white -border 10 \
\( +clone -background black -shadow 80x3+2+2 \) +swap \
-background transparent \
-layers merge \
-rotate ${ROTATION} \
+repage  \
-gravity north \
-splice 0x10 \
\( tesa1.png -resize 200x50! \) -compose Multiply -composite \
-colorspace Gray \
"$OUTPUT"


Here are some results:
https://sedna.fiee.net/d/2c3218730f8341aab1fa/

Did you try that with the filter module? It would make it more portable

Hans

ps. It is still on my todo list to see of we can add some of metafont's bit stuff.

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to