Sujet : Re: is there an image package that doesn't require Tk ?
De : avl (at) *nospam* logic.at (Andreas Leitgeb)
Groupes : comp.lang.tclDate : 28. Jun 2024, 23:07:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnv7ud1t.3gvbf.avl@logic.at>
References : 1
User-Agent : slrn/1.0.3 (Linux)
Andreas Leitgeb <
avl@logic.at> wrote:
I'd like it to open a .png file (screenshot from an android
phone) extract five rectangular regions from it, and convert
them to something similar to Tk's [$image data] - e.g. a list
of lists of colors
Thanks to all who answered...
Unfortunately, I haven't yet succeeded with any of the suggestions.
That's where I got stuck with each:
Gerald Lester:
http://www.graphicsmagick.org/TclMagick/doc/TclMagick.htmlTed Nolan:
https://wiki.tcl-lang.org/page/TclMagickI got it to configure it
(--with-magick=/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.11/bin-q16/MagickWand-config)
compile and install "apparently" successfully, but "package require TclMagick"
spews out:
couldn't load file "/usr/local/lib/TclMagick0.45/libTclMagick.so":
/usr/local/lib/TclMagick0.45/libTclMagick.so: undefined symbol:
tclStubsPtr
Harald Oehlmann:
https://core.tcl-lang.org/akupries/crimp/homeI eventually got critcl (from Ubuntu apt) and kettle (from fossil)
installed. If I try to install crimp, it fails at:
install-doc-markdown: no files matched glob pattern "*"
while executing
"glob -directory $src *"
I only find the keyword "install-doc-markdown" in kettle's source
tree, but don't grok it how to just skip that part. Unfortunately,
the docs are the first thing installed, so as it fails there, nothing
else gets installed.
greg:
https://wiki.tcl-lang.org/page/PixaneThanks for suggesting, but without source - I'll rather not use it.
greg:
https://github.com/ray2501/tcl-stbimageSeems more targetted towards converting images between formats
and resizing. According to the web page it doesn't seem like
supporting extracting rectangular regions from a bigger image
or any simple access to pixels or rectangles of pixels.
Paul Obermeier:
https://github.com/flightaware/tcl.gdExtracting rectangles seems covered by "copy", but I didn't
see (in the docs) any sub command to extract an image's data
as "list of list of color" - I could query single pixels,
and I could get it in binary gd/gd2 format, but not sure what
that is...