On 9/19/2025 8:36 PM, Henning Hraban Ramm wrote:
Am 19.09.25 um 18:48 schrieb Hans Hagen via ntg-context:
I pushed an update. Apart from a few fixed (most already mentioned on
the list) the main addition is in some experiments with metapost and
bitmaps. We (Keith, Mikael, me) will follow up on that later when
we're done / satisfied with experimenting but the code is already there.
Thank you! Unfortunately, it changes neither the “entry not flushed”
problem nor the “{0}{0}” in PDF bookmarks.
lucky me i have no clue what that's about ... are you sure the bookmark
is anchored someplace
Here's a teaser for Hraban who loves drop shadows, just run:
meta-imp-noise.mkxl
This is fun, fits the “smoking” quote very well! :D
Ha, I'd not realized that.
Another nice test is this:
\startMPcode
triplet bm ; bm := loadbytemapfromfile(1, "mill.png") ;
newbytemap 2 of (1,1,1);
downsamplebytemap(1,2,2);
draw unitsquare
bytemapscaled 1 xsized .5 TextWidth
withbytemap 1
;
draw unitsquare
bytemapscaled 1 xsized .5TextWidth
shifted (.5TextWidth,0)
withbytemap 2
;
\stopMPcode
So, this is copying and downsampling?
Indeed. But currently only in the mp route. It's easy to add to the png
route. But forget about jpg as that woudl demand going -> png which
probably is costly and i don't want to pull in libraries. (One can of
course convert beforehand to png.)
Would be great if we could get rid of the dependency on GraphicsMagick.
and here's another teaser:
colorfunction = "bw_inverse",
colorfunction = "bw_darker",
colorfunction = "bw_grain",
Ah, the first photo filters! Then is auto-contrast, sharpening, blurring
etc. just a bytemap definition away.
e.g. https://ai.stanford.edu/~syyeung/cvweb/tutorial1.html
or https://lodev.org/cgtutor/filtering.html
I'll check it ... simple functions should be easy. But only if used and
usefull.
I think I begin to understand how to implement these… (But I prefer to
do image manipulations visually.)
Sure. This is part of (driven by) other usage too, but it being fast it
could actually at some point help to keep non-final runs fast with small
pdf when lots of such images are there.
to keep him busy ... have fun,
I would die of boredom otherwise. ;P
I'll think of more.
Hans
-----------------------------------------------------------------
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 : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________