TclMagick, GraphicMagick and the registry (WAS: Re: resizing JPEGs (with Img and photo image))



Thanks for your hints, suggestions and advice.

But to be honest ... I never built any tcl extension, like I never
used cygwin, gnu compile tools, minw or another build system on my MS
Windows computer and I don't know enough about configure scripts,
etc..

The only thing I want is ...

1. ... a TclMagick DLL looking in its own directory for the (Image|
Graphic)Magick DLLs, or if not found inside the path (normal OS
behaviour, right?)
2. ... a set of (Image|Graphic)Magick DLLs, that don't need any
registry keys or environment variables
3. ... a most simple extension to be used right out of the box

What I did until today ...

1. ... installed GraphicMagick to get the DLLs used by TclMagick
2. ... found out which (Image|Graphic)Magick DLLs depends on each
other, because I only want to resize a JPEG file to a thumbnail
3. ... reduced the size of the starpack by including the TclMagick
"Package" and the minimal set of needed and dependend (Image|
Graphic)Magick DLL files
4. ... built the starpack used it on one computer, where it worked,
even after uninstalling GraphicMagick
5. ... copied the starpack to another computer, where it failed,
because GraphicMagick never was installed

I'm a software developer, but sometimes I just want to be in the rule
of the user of packages, where I hopefully don't have to invest too
much time to. If I have to develop on a package I want to use, I'm not
so amused of.
But here it is not the propblem of TclMagick - it's a problem of
GraphicMagick, which registers without asking file type associations
and its paths, configuration, etc..

Why is this necessary?

Ok - this JPEG handling starpack is my private fun, so I'll use the
standard distribution of TclMagick, and GraphicMagick and I'll fake
the registry.

Best regards,

Martin

On Jul 30, 6:50 pm, s...@xxxxxxxxxxxx wrote:
On Mon, 30 Jul 2007, MartinLemburg@UGS wrote:
Date: Mon, 30 Jul 2007 08:11:45 -0700
From: "MartinLemburg@UGS" <martin.lemburg....@xxxxxxx>
Newsgroups: comp.lang.tcl
Subject: Re: resizing JPEGs (with Img and photo image)

Yes ... and it is very, very quick!

But ... I'm not able to use inside a starpack, because ImageMagick or
GraphicMagick wants to use some registry keys, created while
installing the DLLs on one computer.
Those registry keys will be missed on another computer, even while the
DLLs would work.

Workaround:
Create such registry keys, if not existent and delete them at the
end of the work.
Risk
A crash or unexpected starpack end might prevent the registry
cleanup at the end.

Why is TclMagick (with (Image|Graphic)Magick only available with an
installation?

Greetings,

Martin

On Jul 30, 4:33 pm, "davidnwel...@xxxxxxxxx" <davidnwel...@xxxxxxxxx>
wrote:
better off going tohttp://wiki.tcl.tk/9775(i.e. TclMagick) which is
far more capable (and faster) than scripted versions.

TclMagick also has the advantage over Img and the like that you can
use it without Tk if you ever wanted to do something like a web
version.

It appears that ImageMagick has a ./configure option not to create an
"Install" version (--disable-installed), and thus the standard "paths" are
not created as defaults, but are instead read from environment variables.
This may well prevent the requirement for registry entries if all you need
are the Wand libraries, but does create some difficulties when compiling
TclMagick, as the Wand-config utility will not be on the path as a result.

As TclMagick amounts to essentially a single .c and .h, (in ./generic)
hacking together a make script turns out to be not too difficult, though
without the handy Wand-config tool, you'll have to pay some attention to
required libraries and paths to same ...

As we are speaking about "registry keys", I assume that .dll's are the
required format, and some care in wrapping will ensure that you package up
everything that a standard windows box does not ... perhaps doing a full
install will assist you by giving you a list of required libs and paths as
determined by Wand-config, and then proceed with creating libraries using
the "no-install" option.

On FreeBSD, the following script works to compile tclMagick (note the
backticks around the Wand-config command):

wndcfg=/usr/local/bin/Wand-config
gcc -shared -DUSE_TCL_STUBS -fPIC -DUSE_TK_STUBS -DUSE_TK_STUBS -I. \
-I/usr/local/include -L/usr/local/lib -L/usr/lib \
`$wndcfg --ldflags --libs` \
-o tclmagick.so -O2 -DNDEBUG TclMagick.c

a variation on the above using mingw32 should do the trick for windows,
with the only issue is to determine the values for Wand-config --ldflags
and --libs for your particular platform.

Hope this helps ...
Rob.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----http://www.newsfeeds.comThe #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


.



Relevant Pages

  • RE: Major problems with UAC
    ... registry keys to a disk file in some 'special' folder somewhere. ... DLLs are loaded by our services, and by many end-user applications. ... Nothing works with UAC turned on. ...
    (microsoft.public.platformsdk.security)
  • Re: Process viewer?
    ... By default the .dlls are in view, to see the registry keys, go to view ... menu\lower pane view\handles.. ... scroll down to see the registry keys. ...
    (microsoft.public.windowsxp.security_admin)