For Programmers: Free Programming Magazines  


Home > Archive > Tcl > February 2005 > Anyone knows how to run "package require Img" when not running x-windows /









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Anyone knows how to run "package require Img" when not running x-windows /

2005-02-21, 9:00 pm

Anyone knows how to run "package req Img" when not running x-windows /
windows ?

I get an error of :this isn't a Tk applicationcouldn't connect to display
"127.0.0.1:0.0"

Since I am running it in a shell, the problem is that I do not want to run
windows / x-win

since I just want to resize images ...

Any help is appreciated ?

Regards,

Sean.


Robert Heller

2005-02-22, 4:00 am

<born2net@sbcglobal.net>,
In a message on Tue, 22 Feb 2005 00:00:37 GMT, wrote :

> Anyone knows how to run "package req Img" when not running x-windows /
> windows ?
>
> I get an error of :this isn't a Tk applicationcouldn't connect to display
> "127.0.0.1:0.0"
>
> Since I am running it in a shell, the problem is that I do not want to run
> windows / x-win
>
> since I just want to resize images ...
>
> Any help is appreciated ?


The Img package is highly dependent on parts of the Tk package, which is
highly dependent on the GUI sub-system (X11 or MS-Windows). There is
no meaningful way to re-write Img to not be dependent on Tk and this
includes the parts of it relating to resizing -- the Img package itself
does not in fact include code to re-size images -- that code is actually
part of Tk itself, all Img adds is a batch of additional image file
formats that are not part of the core Tk code and all of the actual
image manipulation is part of the Tk itself.

Under UNIX/Linux, you could install the ImageMagick package and use the
convert program as a sub-process (eg exec convert image.png -geometry
50x50 thumb.png). I don't know if there is a MS-Windows port of
ImageMagick (there might be).

>
> Regards,
>
> Sean.
>
>
>


\/
Robert Heller ||InterNet: heller@cs.umass.edu
http://vis-www.cs.umass.edu/~heller || heller@deepsoft.com
http://www.deepsoft.com /\FidoNet: 1:321/153







David N. Welton

2005-02-22, 4:00 am

Robert Heller <heller@deepsoft.com> writes:

> The Img package is highly dependent on parts of the Tk package, which is
> highly dependent on the GUI sub-system (X11 or MS-Windows). There is
> no meaningful way to re-write Img to not be dependent on Tk and this
> includes the parts of it relating to resizing -- the Img package itself
> does not in fact include code to re-size images -- that code is actually
> part of Tk itself, all Img adds is a batch of additional image file
> formats that are not part of the core Tk code and all of the actual
> image manipulation is part of the Tk itself.


Right.

> Under UNIX/Linux, you could install the ImageMagick package and use
> the convert program as a sub-process (eg exec convert image.png
> -geometry 50x50 thumb.png). I don't know if there is a MS-Windows
> port of ImageMagick (there might be).


There are ports of both GraphicsMagick and ImageMagick for Linux,
Windows and so on. Even better, there is also a TclMagick API that
lets you work with either one from Tcl. And if you ever want to talk
with Tk, TkMagick takes care of that part.

--
David N. Welton
- http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
- http://www.dedasys.com/
Cameron Laird

2005-02-23, 3:59 am

In article <873bvpax1p.fsf@dedasys.com>,
David N. Welton <davidw@dedasys.com> wrote:
>Robert Heller <heller@deepsoft.com> writes:
>
>
>Right.
>
>
>There are ports of both GraphicsMagick and ImageMagick for Linux,
>Windows and so on. Even better, there is also a TclMagick API that
>lets you work with either one from Tcl. And if you ever want to talk
>with Tk, TkMagick takes care of that part.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com