Re: is there an image package that doesn't require Tk ?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: is there an image package that doesn't require Tk ?
De : avl (at) *nospam* logic.at (Andreas Leitgeb)
Groupes : comp.lang.tcl
Date : 30. Jun 2024, 17:58:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnv833ko.3gvbf.avl@logic.at>
References : 1 2
User-Agent : slrn/1.0.3 (Linux)
Andreas Leitgeb <avl@logic.at> wrote:
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.

I didn't mean to make anyone "responsible" in any way for a suggestion
made - quite the opposite: I was happy for all suggestions.

In the end I went without tcl package, and merely invoke the
imagemagick tool "convert" with a list of parameters such that
it writes out an uncompressed bmp3 in 16-colors (palette) mode,
which turned out pretty simple to parse from Tcl code (binary scan).

Given a "list-of-list-of-color", it is amazingly simple
to extract a sub-rectangle:

   proc rect {data x1 y1 x2 y2} {
      lmap row [lrange $data $y1 $y2] { lrange $row $x1 $x2 }
   }

Case closed ;-)

Date Sujet#  Auteur
27 Jun 24 * is there an image package that doesn't require Tk ?17Andreas Leitgeb
27 Jun 24 +- Re: is there an image package that doesn't require Tk ?1ted@loft.tnolan.com (Ted Nolan
27 Jun 24 +- Re: is there an image package that doesn't require Tk ?1Harald Oehlmann
27 Jun 24 +- Re: is there an image package that doesn't require Tk ?1Paul Obermeier
27 Jun 24 +* Re: is there an image package that doesn't require Tk ?3greg
28 Jun 24 i+- Re: is there an image package that doesn't require Tk ?1Harald Oehlmann
28 Jun 24 i`- Re: is there an image package that doesn't require Tk ?1greg
28 Jun 24 `* Re: is there an image package that doesn't require Tk ?10Andreas Leitgeb
29 Jun 24  +- Re: is there an image package that doesn't require Tk ?1ted@loft.tnolan.com (Ted Nolan
29 Jun 24  +* Re: is there an image package that doesn't require Tk ?7greg
30 Jun 24  i`* Re: is there an image package that doesn't require Tk ?6Andreas Leitgeb
30 Jun 24  i +* Re: is there an image package that doesn't require Tk ?4greg
1 Jul 24  i i`* Re: is there an image package that doesn't require Tk ?3Andreas Leitgeb
2 Jul 24  i i `* Re: is there an image package that doesn't require Tk ?2greg
3 Jul 24  i i  `- Re: is there an image package that doesn't require Tk ?1Andreas Leitgeb
1 Jul 24  i `- Re: is there an image package that doesn't require Tk ?1Christian Gollwitzer
30 Jun 24  `- Re: is there an image package that doesn't require Tk ?1Andreas Leitgeb

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal