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 : gregor.ebbing (at) *nospam* gmx.de (greg)
Groupes : comp.lang.tcl
Date : 02. Jul 2024, 23:21:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v61uh0$1qi1d$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
Am 01.07.24 um 19:55 schrieb Andreas Leitgeb:
greg <gregor.ebbing@gmx.de> wrote:
Am 30.06.24 um 21:05 schrieb Andreas Leitgeb:
So, please, let me know where you got 0.46 from.
https://sourceforge.net/projects/graphicsmagick/files/
>
Download Latest version
GraphicsMagick-1.3.43.tar.xz
in
GraphicsMagick-1.3.43.tar.xz
is TclMagick 0.46
 Thanks, now I got it :-)
 
make
./configure
make install
(/usr/lib/TclMagick0.46)
 
package require TclMagick
 I got this too, now, so it seems like the stubs-thing was
fixed in this 0.46 :-)
 
set wand [magick create wand]
 Yes, the extension seems to work in principle, but it seems
like graphicsmagick dropped the "-copy" feature from "convert",
which I'd have had good use for...   Also I got it into seg-
faults a couple of times, as well, but maybe my commands were
just bad.
 Querying "pixels" just didn't do anything visible with an
empty "map"-argument, and segfaulted with whatever else I
tried for that argument.  Maybe I read the docs not well enough..
 My current solution involves "-copy" to copy certain "far-off"
parts of the image into a more central part, then only convert
the smaller region around the central parts to bmp3 format.
 I might try this TclMagick 0.46 with original imagemagick,
to see if that gives me a "copy" subcommand for $wand.
 And I've yet to study the docs better to see how "pixel" is
really to be used.
 Thanks 2 all!
  # bißchen rumprobiert
  # setPixel
  # parts of it from TclMagick/tests
  set width 100
  set height 100
  set x 50
  set y 50
  # new blank picture
  # xc:$color" from
  # http://www.graphicsmagick.org/formats.html
  set wand [magick create wand]
  set color white
  $wand ReadImage "xc:$color"
  $wand ResizeImage $width $height cubic
  # Create the binary data for red pixels
  # Each pixel requires 3 bytes (RGB),  80x10 pixels
  set red_pixel_data [string repeat [binary format c* {255 0 0}] [expr 80 * 10]]
  $wand SetPixels 0 0 80 10 "RGB" char $red_pixel_data
  $wand WriteImage empty-wr1.png
  # GetPixel
  set extracted_pixels [$wand GetPixels 10 5 80 10 "RGB" char]
  # Paste the extracted region to a new location
  $wand SetPixels 20 30 80 10 "RGB" char $extracted_pixels
  $wand WriteImage empty-wr2.png
  set pixel_color [$wand GetPixels 15 7 1 1 "RGB" char]
  binary scan $pixel_color c* rgb_values
  set red [lindex $rgb_values 0]
  set green [lindex $rgb_values 1]
  set blue [lindex $rgb_values 2]
  puts "Color of pixel at (15, 7): red=$red, green=$green, blue=$blue"
  magick delete $wand
  # copy with clone?
  # set cwand [$wand clone]

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