Am 24.01.22 um 20:19 schrieb Paul Obermeier:
Am 24.01.22 um 17:58 schrieb [email protected]:
Have a look at this extension:
https://github.com/auriocus/PhotoResize/
In particular, the demo/ folder contains a script with a widget that
scales an image to fit the window and allows resizing, zooming in/out
and dragging around the image.
Binaries of the extension compiled via Github Actions are also
available: https://github.com/auriocus/PhotoResize/releases (under
Assets)
Christian
This looks like what I'm trying to do. However once I figured out how
to get a tarball from GitHub, I got errors when trying to compile.
./configure worked, there was a warning about needing SWIG 1.3... and
I have version 3... however after make there were errors. The frst
error was:
./generic/photoresize.cpp:273:18: error: template argument 1 is invalid
class accum<tuple> {
^
./generic/photoresize.cpp: In function ‘std::__cxx11::string
resizephoto(Tcl_Interp*, Tk_PhotoHandle, Tk_PhotoHandle, int, int)’:
./generic/photoresize.cpp:330:17: error: template argument 1 is invalid
vector <tuple> pixelPtr(xsize*ysize);
^
I'm not sure what is going wrong,
Are you sure you used the latest sources? This sounds like an error that
was fixed a while ago; in short, "tuple" is a name in the C++ standard
library. In the current version, line 330 reads:
std::vector <tuple> pixelPtr(xsize*ysize);
https://github.com/auriocus/PhotoResize/blob/6752d0e4f3694d9afa4d878b3e9aaacff7d4a21a/generic/photoresize.cpp#L330
Also, the support for subimages and the image display widget were added
in the recent "development" version only.
To get code from the master branch without using git, you go to the
green "Code" button and choose "Download ZIP"
which points to this link:
https://github.com/auriocus/PhotoResize/archive/refs/heads/master.zip
You could also try to use the binaries compiled in the Github actions,
they might not work, though, if your system gcc is too old.
Best regards,
Christian
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)