* Fallback mode for image magick? @ 2013-06-27 14:05 Klaus-Dieter Bauer 2013-06-27 15:35 ` Lars Magne Ingebrigtsen 2013-06-27 17:00 ` Glenn Morris 0 siblings, 2 replies; 18+ messages in thread From: Klaus-Dieter Bauer @ 2013-06-27 14:05 UTC (permalink / raw) To: emacs-devel [-- Attachment #1: Type: text/plain, Size: 710 bytes --] Hello! Org mode uses the compiled-in image-magick support for scaling in-buffer images. Sadly, this feature doesn't work with the (precompiled) Windows version of emacs. Is there some fallback solution available to get image-scaling through convert.exe instead transparently faking the imagemagick-magick support to emacs lisp code? If not, can someone give me a pointer as to what functions and variables I'd have to overwrite/supply in order to write such a fallback solution (in emacs lisp)? I fear that by looking up the code I might end up with a perfectly working `create-image` function, but modes ignoring it because they check for some other variable or function. kind regards, Klaus-Dieter Bauer [-- Attachment #2: Type: text/html, Size: 886 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-27 14:05 Fallback mode for image magick? Klaus-Dieter Bauer @ 2013-06-27 15:35 ` Lars Magne Ingebrigtsen 2013-06-27 16:17 ` Glenn Morris ` (2 more replies) 2013-06-27 17:00 ` Glenn Morris 1 sibling, 3 replies; 18+ messages in thread From: Lars Magne Ingebrigtsen @ 2013-06-27 15:35 UTC (permalink / raw) To: Klaus-Dieter Bauer; +Cc: emacs-devel Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> writes: > Org mode uses the compiled-in image-magick support for scaling > in-buffer images. Sadly, this feature doesn't work with the > (precompiled) Windows version of emacs. Doesn't ImageMagick support Windows? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-27 15:35 ` Lars Magne Ingebrigtsen @ 2013-06-27 16:17 ` Glenn Morris 2013-06-27 16:29 ` Klaus-Dieter Bauer 2013-06-27 17:34 ` Eli Zaretskii 2 siblings, 0 replies; 18+ messages in thread From: Glenn Morris @ 2013-06-27 16:17 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: Klaus-Dieter Bauer, emacs-devel Lars Magne Ingebrigtsen wrote: > Doesn't ImageMagick support Windows? From NEWS: ** Emacs can be compiled with ImageMagick support. [...] This feature is not available for the Nextstep or MS ports. (probably because no-one wrote the Emacs integration parts.) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-27 15:35 ` Lars Magne Ingebrigtsen 2013-06-27 16:17 ` Glenn Morris @ 2013-06-27 16:29 ` Klaus-Dieter Bauer 2013-06-27 17:34 ` Eli Zaretskii 2 siblings, 0 replies; 18+ messages in thread From: Klaus-Dieter Bauer @ 2013-06-27 16:29 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1055 bytes --] It does. I have a native convert.exe. But emacs (on Unix and Cygwin) now has builtin ImageMagick support (as in emacs can resize images without calling an external program). The precompiled Windows binaries don't have it builtin though and according to Glenn Morris answer it is simply not available for Windows and NextStep. Hence I am searching for a solution to emulate the builtin support in a way such that other people's emacs lisp code doesn't have to be aware of it. From org-mode I can remember, that they query for some `imagemagick-*` function or variable that is not defined in the Windows binaries. 2013/6/27 Lars Magne Ingebrigtsen <larsi@gnus.org> > Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> writes: > > > Org mode uses the compiled-in image-magick support for scaling > > in-buffer images. Sadly, this feature doesn't work with the > > (precompiled) Windows version of emacs. > > Doesn't ImageMagick support Windows? > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog http://lars.ingebrigtsen.no/ > [-- Attachment #2: Type: text/html, Size: 1636 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-27 15:35 ` Lars Magne Ingebrigtsen 2013-06-27 16:17 ` Glenn Morris 2013-06-27 16:29 ` Klaus-Dieter Bauer @ 2013-06-27 17:34 ` Eli Zaretskii 2 siblings, 0 replies; 18+ messages in thread From: Eli Zaretskii @ 2013-06-27 17:34 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: bauer.klaus.dieter, emacs-devel > From: Lars Magne Ingebrigtsen <larsi@gnus.org> > Date: Thu, 27 Jun 2013 17:35:08 +0200 > Cc: emacs-devel@gnu.org > > Doesn't ImageMagick support Windows? It does. But Emacs on Windows doesn't support ImageMagick. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-27 14:05 Fallback mode for image magick? Klaus-Dieter Bauer 2013-06-27 15:35 ` Lars Magne Ingebrigtsen @ 2013-06-27 17:00 ` Glenn Morris 2013-06-28 12:15 ` Klaus-Dieter Bauer 1 sibling, 1 reply; 18+ messages in thread From: Glenn Morris @ 2013-06-27 17:00 UTC (permalink / raw) To: Klaus-Dieter Bauer; +Cc: emacs-devel Klaus-Dieter Bauer wrote: > Is there some fallback solution available to get image-scaling through > convert.exe instead transparently faking the imagemagick-magick support to > emacs lisp code? You could look at how image-dired.el or thumbs.el do it. Both still use external ImageMagick support (bug#10758). ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-27 17:00 ` Glenn Morris @ 2013-06-28 12:15 ` Klaus-Dieter Bauer 2013-06-28 12:22 ` Lars Magne Ingebrigtsen 0 siblings, 1 reply; 18+ messages in thread From: Klaus-Dieter Bauer @ 2013-06-28 12:15 UTC (permalink / raw) To: Glenn Morris; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 902 bytes --] 2013/6/27 Glenn Morris <rgm@gnu.org> > Klaus-Dieter Bauer wrote: > > > Is there some fallback solution available to get image-scaling through > > convert.exe instead transparently faking the imagemagick-magick support > to > > emacs lisp code? > > You could look at how image-dired.el or thumbs.el do it. > Both still use external ImageMagick support (bug#10758). > Can you elaborate on this? I appreciate the answer, as it will ease implementing the use of convert.exe. My intent however is to write a fix, that makes this a default fallback for code that wants to use builtin support without the need to edit the third party source code. Finding out what functions and variables I need to emulate is the hard part here for me. I can probably do it by comparing the defined variables in emacs on Cygwin and native Windows, but it would give a high risk of missing something. kind regards, Klaus [-- Attachment #2: Type: text/html, Size: 1456 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-28 12:15 ` Klaus-Dieter Bauer @ 2013-06-28 12:22 ` Lars Magne Ingebrigtsen 2013-07-01 22:00 ` Klaus-Dieter Bauer 0 siblings, 1 reply; 18+ messages in thread From: Lars Magne Ingebrigtsen @ 2013-06-28 12:22 UTC (permalink / raw) To: Klaus-Dieter Bauer; +Cc: emacs-devel Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> writes: > My intent however is to write a fix, that makes this a default > fallback for code that wants to use builtin support without the need > to edit the third party source code. Finding out what functions and > variables I need to emulate is the hard part here for me. If you could implement native ImageMagick support for Emacs under Microsoft Windows, that would probably be even better. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-06-28 12:22 ` Lars Magne Ingebrigtsen @ 2013-07-01 22:00 ` Klaus-Dieter Bauer 2013-07-02 22:12 ` Klaus-Dieter Bauer 0 siblings, 1 reply; 18+ messages in thread From: Klaus-Dieter Bauer @ 2013-07-01 22:00 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel [-- Attachment #1.1: Type: text/plain, Size: 1610 bytes --] 2013/6/28 Lars Magne Ingebrigtsen <larsi@gnus.org> > Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> writes: > > > My intent however is to write a fix, that makes this a default > > fallback for code that wants to use builtin support without the need > > to edit the third party source code. Finding out what functions and > > variables I need to emulate is the hard part here for me. > > If you could implement native ImageMagick support for Emacs under > Microsoft Windows, that would probably be even better. :-) > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog http://lars.ingebrigtsen.no/ > So, I got it to compile by adding DEF_IMGLIB_FN and LOAD_IMGLIB_FN entries like for the other types, following the hint from an older discussion [1] and correcting it. For reference I have attached the patches to nt/configure.bat and src/image.c. Sadly however, I now can't get the MinGW bundle of ImageMagick working. convert.exe: UnableToOpenModuleFile > `C:\Users\klaus\.magick\IM_MOD_RL_PNG_.dll': No such file or directory @ > warning/module.c/GetMagickModulePath/812. While the function `imagemagick-types` is now defined in the session, still no resizing occurs, probably because ImageMagick silently fails. Also in this configuration JPEG is not included in `(imagemagick-types)` for some reason. Apparently the official ImageMagick version for Windows is tightly bound to Visual Studio, which doesn't help the case either. Honestly, the fallback-solution gets more and more attractive ;) [1] http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg01585.html [-- Attachment #1.2: Type: text/html, Size: 3031 bytes --] [-- Attachment #2: image.c.patch --] [-- Type: application/octet-stream, Size: 3505 bytes --] --- image.c.orig 2013-07-01 10:21:08.404397000 +0200 +++ image.c 2013-07-01 18:52:44.323104200 +0200 @@ -8236,6 +8236,72 @@ return Fnreverse (typelist); } +#if defined HAVE_NTGUI && defined WINDOWSNT + +DEF_IMGLIB_FN (void, MagickWandGenesis, (void)); +DEF_IMGLIB_FN (char** , GetMagickList, ( const char *, unsigned long *)); +DEF_IMGLIB_FN (MagickWand*, NewMagickWand, (void)); +DEF_IMGLIB_FN (MagickBooleanType, MagickSetResolution, (MagickWand *, const double, const double)); +DEF_IMGLIB_FN (MagickBooleanType, MagickPingImage, (MagickWand *, const char *)); +DEF_IMGLIB_FN (size_t, MagickGetNumberImages, (MagickWand *)); +DEF_IMGLIB_FN (MagickWand *, DestroyMagicWand, (MagickWand *)); +DEF_IMGLIB_FN (ImageInfo *, CloneImageInfo, (const ImageInfo *)); +DEF_IMGLIB_FN (ExceptionInfo *, AcquireExceptionInfo, (void)); +DEF_IMGLIB_FN (Image *, ReadImage, (const ImageInfo *, ExceptionInfo *)); +DEF_IMGLIB_FN (void, CatchException, (ExceptionInfo *)); +DEF_IMGLIB_FN (MagickWand *, NewMagickWandFromImage, (const Image *)); +DEF_IMGLIB_FN (size_t, MagickGetImageHeight, (MagickWand *)); +DEF_IMGLIB_FN (size_t, MagickGetImageWidth, (MagickWand *)); +DEF_IMGLIB_FN (MagickBooleanType, MagickScaleImage, (MagickWand *,const size_t,const size_t)); +DEF_IMGLIB_FN (MagickBooleanType, MagickPingImageBlob, (MagickWand *,const void *,const size_t)); +DEF_IMGLIB_FN (MagickBooleanType, MagickReadImageBlob, (MagickWand *, const void *, const size_t)); +DEF_IMGLIB_FN (PixelWand*, NewPixelWand, (void)); +DEF_IMGLIB_FN (void, PixelSetColor, (PixelWand *,const size_t)); +DEF_IMGLIB_FN (MagickBooleanType, MagickRotateImage, (MagickWand *,const PixelWand *,const double)); +DEF_IMGLIB_FN (MagickBooleanType, MagickCropImage, (MagickWand *,const size_t,const size_t,const ssize_t, const ssize_t)); +DEF_IMGLIB_FN (PixelIterator*, NewPixelIterator, (MagickWand*)); +DEF_IMGLIB_FN (void, PixelGetMagickColor, (const PixelWand *,MagickPixelPacket *)); +DEF_IMGLIB_FN (PixelIterator*, DestroyPixelIterator,(PixelIterator *iterator)); + +static bool +init_imagemagick_functions (void) +{ + HMODULE library; + + /* Try loading ImageMagick library under probable names. */ + if (!(library = w32_delayed_load (Qimagemagick))) + return 0; + + LOAD_IMGLIB_FN (library, MagickWandGenesis); + LOAD_IMGLIB_FN (library, GetMagickList); + LOAD_IMGLIB_FN (library, NewMagickWand); + LOAD_IMGLIB_FN (library, MagickSetResolution); + LOAD_IMGLIB_FN (library, MagickPingImage); + LOAD_IMGLIB_FN (library, MagickGetNumberImages); + LOAD_IMGLIB_FN (library, DestroyMagicWand); + LOAD_IMGLIB_FN (library, CloneImageInfo); + LOAD_IMGLIB_FN (library, AcquireExceptionInfo); + LOAD_IMGLIB_FN (library, ReadImage); + LOAD_IMGLIB_FN (library, CatchException); + LOAD_IMGLIB_FN (library, NewMagickWandFromImage); + LOAD_IMGLIB_FN (library, MagickGetImageHeight); + LOAD_IMGLIB_FN (library, MagickGetImageWidth); + LOAD_IMGLIB_FN (library, MagickScaleImage); + LOAD_IMGLIB_FN (library, MagickPingImageBlob); + LOAD_IMGLIB_FN (library, MagickReadImageBlob); + LOAD_IMGLIB_FN (library, NewPixelWand); + LOAD_IMGLIB_FN (library, PixelSetColor); + LOAD_IMGLIB_FN (library, MagickRotateImage); + LOAD_IMGLIB_FN (library, MagickCropImage); + LOAD_IMGLIB_FN (library, NewPixelIterator); + LOAD_IMGLIB_FN (library, PixelGetMagickColor); + LOAD_IMGLIB_FN (library, DestroyPixelIterator); + + return 1; +} + +#endif /* defined HAVE_NTGUI && defined WINDOWSNT */ + #endif /* defined (HAVE_IMAGEMAGICK) */ [-- Attachment #3: configure.bat.patch --] [-- Type: application/octet-stream, Size: 3966 bytes --] --- configure.bat.orig 2013-07-01 10:21:08.404397000 +0200 +++ configure.bat 2013-07-01 15:40:15.038522900 +0200 @@ -133,6 +133,7 @@ if "%1" == "--without-gnutls" goto withoutgnutls if "%1" == "--without-libxml2" goto withoutlibxml2 if "%1" == "--without-xpm" goto withoutxpm +if "%1" == "--without-imagemagick" goto withoutimagemagick if "%1" == "--with-svg" goto withsvg if "%1" == "--distfiles" goto distfiles if "%1" == "" goto checkutils @@ -158,6 +159,7 @@ echo. --without-xpm do not use XPM library even if it is installed echo. --without-gnutls do not use GnuTLS library even if it is installed echo. --without-libxml2 do not use libxml2 library even if it is installed +echo. --without-imagemagick do not use ImageMagick library even if it is installed echo. --with-svg use the RSVG library (experimental) echo. --distfiles path to files for make dist, e.g. libXpm.dll if "%use_extensions%" == "0" goto end @@ -353,6 +355,14 @@ rem ---------------------------------------------------------------------- +:withoutimagemagick +set imagemagicksupport=N +set HAVE_IMAGEMAGICK= +shift +goto again + +rem ---------------------------------------------------------------------- + :distfiles set HAVE_DISTFILES=1 shift @@ -722,6 +732,31 @@ set HAVE_RSVG=1 :svgDone + +if (%imagemagicksupport%) == (N) goto imagemagickDone + +echo Checking for ImageMagick... +echo #define FOR_MSW 1 >junk.c +echo #define MAGICKCORE_QUANTUM_DEPTH 16 >>junk.c +echo #define MAGICKCORE_HDRI_ENABLE 0 >>junk.c +echo #include "wand/MagickWand.h" >>junk.c +echo main (){} >>junk.c +rem -o option is ignored with cl, but allows result to be consistent. +echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log +%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log +if exist junk.obj goto haveImagemagick + +echo ...wand/MagickWand.h not found, building without ImageMagick support. +echo The failed program was: >>config.log +type junk.c >>config.log +set HAVE_IMAGEMAGICK= +goto :imagemagickDone + +:haveImageMagick +echo ...ImageMagick header available, building with ImageMagick support. +set HAVE_IMAGEMAGICK=1 + +:imagemagickDone rm -f junk.c junk.obj junk.err junk.out rem Any distfiles provided for building distribution? If no, we're done. @@ -809,6 +844,7 @@ if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp +if not "(%HAVE_IMAGEMAGICK%)" == "()" echo #define HAVE_IMAGEMAGICK 1 >>config.tmp if "(%HAVE_RSVG%)" == "(1)" echo #define HAVE_RSVG 1 >>config.tmp echo /* End of settings from configure.bat. */ >>config.tmp @@ -893,12 +929,19 @@ echo Install libtiff development files or use --without-tiff :checkgif -if not "(%HAVE_GIF%)" == "()" goto checkdistfiles -if (%gifsupport%) == (N) goto checkdistfiles +if not "(%HAVE_GIF%)" == "()" goto checkimagemagick +if (%gifsupport%) == (N) goto checkimagemagick set libsOK=0 echo GIF support is missing. echo Install giflib or libungif development files or use --without-gif +:checkimagemagick +if not "(%HAVE_IMAGEMAGICK%)" == "()" goto checkdistfiles +if (%imagemagicksupport%) == (N) goto checkdistfiles + set libsOK=0 + echo ImageMagick support is missing. + echo Install ImageMagick development files or use --without-imagemagick + :checkdistfiles if "(%HAVE_DISTFILES%)" == "()" goto donelibchecks if (%distFilesOk%) == (1) goto donelibchecks @@ -950,12 +993,14 @@ set tiffsupport= set xpmsupport= set svgsupport= +set imagemagicksupport= set libsOK= set HAVE_GIF= set HAVE_JPEG= set HAVE_PNG= set HAVE_TIFF= set HAVE_XPM= +set HAVE_IMAGEMAGICK= set dbginfo= endlocal set use_extensions= ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-01 22:00 ` Klaus-Dieter Bauer @ 2013-07-02 22:12 ` Klaus-Dieter Bauer 2013-07-06 15:31 ` Lars Ingebrigtsen 0 siblings, 1 reply; 18+ messages in thread From: Klaus-Dieter Bauer @ 2013-07-02 22:12 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 2304 bytes --] 2013/7/2 Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> > 2013/6/28 Lars Magne Ingebrigtsen <larsi@gnus.org> > >> Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> writes: >> >> > My intent however is to write a fix, that makes this a default >> > fallback for code that wants to use builtin support without the need >> > to edit the third party source code. Finding out what functions and >> > variables I need to emulate is the hard part here for me. >> >> If you could implement native ImageMagick support for Emacs under >> Microsoft Windows, that would probably be even better. :-) >> >> -- >> (domestic pets only, the antidote for overdose, milk.) >> bloggy blog http://lars.ingebrigtsen.no/ >> > > So, I got it to compile by adding DEF_IMGLIB_FN and LOAD_IMGLIB_FN entries > like for the other types, following the hint from an older discussion [1] > and correcting it. For reference I have attached the patches to > nt/configure.bat and src/image.c. > > Sadly however, I now can't get the MinGW bundle of ImageMagick working. > > convert.exe: UnableToOpenModuleFile >> `C:\Users\klaus\.magick\IM_MOD_RL_PNG_.dll': No such file or directory @ >> warning/module.c/GetMagickModulePath/812. > > > While the function `imagemagick-types` is now defined in the session, > still no resizing occurs, probably because ImageMagick silently fails. > > Also in this configuration JPEG is not included in `(imagemagick-types)` > for some reason. > > Apparently the official ImageMagick version for Windows is tightly bound > to Visual Studio, which doesn't help the case either. > > Honestly, the fallback-solution gets more and more attractive ;) > > > [1] http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg01585.html > I now got emacs to compile with static linking and image-magick support linking to the standard binary distribution of ImageMagick for Windows. Basically that version of emacs works fine. `imagemagick-types` is defined, jpeg/png images can be displayed when the jpeg-62.dll etc are on PATH, emacs starts without complaint if they are not. Imagescaling however still doesn't work. I cross-checked with Cygwin, there scaling works in org-mode (not though when doing ``(insert-image (create-image .... :width 100))``). Is there something I am missing? kind regards, Klaus [-- Attachment #2: Type: text/html, Size: 4270 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-02 22:12 ` Klaus-Dieter Bauer @ 2013-07-06 15:31 ` Lars Ingebrigtsen 2013-07-06 15:52 ` Eli Zaretskii 0 siblings, 1 reply; 18+ messages in thread From: Lars Ingebrigtsen @ 2013-07-06 15:31 UTC (permalink / raw) To: Klaus-Dieter Bauer; +Cc: emacs-devel Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> writes: > I now got emacs to compile with static linking and image-magick > support linking to the standard binary distribution of ImageMagick for > Windows. > > Basically that version of emacs works fine. `imagemagick-types` is > defined, jpeg/png images can be displayed when the jpeg-62.dll etc are > on PATH, emacs starts without complaint if they are not. Sounds promising. > Imagescaling however still doesn't work. > > I cross-checked with Cygwin, there scaling works in org-mode (not > though when doing ``(insert-image (create-image .... :width 100))``). > > Is there something I am missing? Could someone with more knowledge of Emacs under Windows please help here? Adding ImageMagick support to the Windows version of Emacs would be quite useful, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-06 15:31 ` Lars Ingebrigtsen @ 2013-07-06 15:52 ` Eli Zaretskii 2013-07-06 15:59 ` Lars Ingebrigtsen ` (2 more replies) 0 siblings, 3 replies; 18+ messages in thread From: Eli Zaretskii @ 2013-07-06 15:52 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: bauer.klaus.dieter, emacs-devel > From: Lars Ingebrigtsen <larsi@gnus.org> > Date: Sat, 06 Jul 2013 17:31:25 +0200 > Cc: emacs-devel@gnu.org > > > Imagescaling however still doesn't work. > > > > I cross-checked with Cygwin, there scaling works in org-mode (not > > though when doing ``(insert-image (create-image .... :width 100))``). > > > > Is there something I am missing? > > Could someone with more knowledge of Emacs under Windows please help > here? Help how? I don't see anything Windows-specific in the description above, and know nothing about ImageMagick and how Emacs uses it to guess what could be wrong. The OP should debug Emacs to see what happens when image scaling is being requested, and tell the details. Perhaps then this will become a Windows specific issue. For now, this is an ImageMagick issue. Btw, statically linking against ImageMagick is a no-starter for Windows. But this can be fixed later, once the statically linked executable works. Btw^2, what about GraphicsMagick? ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-06 15:52 ` Eli Zaretskii @ 2013-07-06 15:59 ` Lars Ingebrigtsen 2013-07-06 16:04 ` Eli Zaretskii 2013-07-07 9:22 ` Klaus-Dieter Bauer 2013-07-06 17:10 ` Glenn Morris 2013-07-07 9:28 ` Klaus-Dieter Bauer 2 siblings, 2 replies; 18+ messages in thread From: Lars Ingebrigtsen @ 2013-07-06 15:59 UTC (permalink / raw) To: Eli Zaretskii; +Cc: bauer.klaus.dieter, emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > Help how? I don't see anything Windows-specific in the description > above, and know nothing about ImageMagick and how Emacs uses it to > guess what could be wrong. There might be a problem in how he's defined the ImageMagick Emacs interface functions that leads to stuff, er, not working. If he posts a new version of the patch, could you have a look at it and see whether it looks reasonable? > Btw^2, what about GraphicsMagick? I don't know anything about GraphicsMagick. Is that a fork of ImageMagick? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-06 15:59 ` Lars Ingebrigtsen @ 2013-07-06 16:04 ` Eli Zaretskii 2013-07-07 9:22 ` Klaus-Dieter Bauer 1 sibling, 0 replies; 18+ messages in thread From: Eli Zaretskii @ 2013-07-06 16:04 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: bauer.klaus.dieter, emacs-devel > From: Lars Ingebrigtsen <larsi@gnus.org> > Cc: bauer.klaus.dieter@gmail.com, emacs-devel@gnu.org > Date: Sat, 06 Jul 2013 17:59:11 +0200 > > Eli Zaretskii <eliz@gnu.org> writes: > > > Help how? I don't see anything Windows-specific in the description > > above, and know nothing about ImageMagick and how Emacs uses it to > > guess what could be wrong. > > There might be a problem in how he's defined the ImageMagick Emacs > interface functions that leads to stuff, er, not working. If he posts a > new version of the patch, could you have a look at it and see whether it > looks reasonable? I won't know where to look. Not unless someone who knows how Emacs interfaces with ImageMagick for scaling images describes how this works. > I don't know anything about GraphicsMagick. Is that a fork of ImageMagick? Yes. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-06 15:59 ` Lars Ingebrigtsen 2013-07-06 16:04 ` Eli Zaretskii @ 2013-07-07 9:22 ` Klaus-Dieter Bauer 1 sibling, 0 replies; 18+ messages in thread From: Klaus-Dieter Bauer @ 2013-07-07 9:22 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: Eli Zaretskii, emacs-devel [-- Attachment #1: Type: text/plain, Size: 647 bytes --] 2013/7/6 Lars Ingebrigtsen <larsi@gnus.org> > Eli Zaretskii <eliz@gnu.org> writes: > > > Help how? I don't see anything Windows-specific in the description > > above, and know nothing about ImageMagick and how Emacs uses it to > > guess what could be wrong. > > There might be a problem in how he's defined the ImageMagick Emacs > interface functions that leads to stuff, er, not working. If he posts a > new version of the patch, could you have a look at it and see whether it > looks reasonable? The patch did not change anymore. After what I patched the remaining issues I had (except for "scaling not working") were compilation problems. [-- Attachment #2: Type: text/html, Size: 1132 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-06 15:52 ` Eli Zaretskii 2013-07-06 15:59 ` Lars Ingebrigtsen @ 2013-07-06 17:10 ` Glenn Morris 2013-07-07 9:28 ` Klaus-Dieter Bauer 2 siblings, 0 replies; 18+ messages in thread From: Glenn Morris @ 2013-07-06 17:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, bauer.klaus.dieter, emacs-devel Eli Zaretskii wrote: > Btw^2, what about GraphicsMagick? http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14358 ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-06 15:52 ` Eli Zaretskii 2013-07-06 15:59 ` Lars Ingebrigtsen 2013-07-06 17:10 ` Glenn Morris @ 2013-07-07 9:28 ` Klaus-Dieter Bauer 2013-07-07 15:59 ` Eli Zaretskii 2 siblings, 1 reply; 18+ messages in thread From: Klaus-Dieter Bauer @ 2013-07-07 9:28 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, emacs-devel [-- Attachment #1: Type: text/plain, Size: 652 bytes --] 2013/7/6 Eli Zaretskii <eliz@gnu.org> > [...] > > Btw, statically linking against ImageMagick is a no-starter for > Windows. But this can be fixed later, once the statically linked > executable works. > I guess there might be a misunderstanding in my compiling-vocabulary here; What I meant is that I compiled with "--ldflags -static". When I compiled this way, emacs would start without complaint when any of the DLLs (including jpeg, png etc) were not available, which is the behaviour I saw in binary releases for Windows. When I did not use the -static flag and removed the DLLs from PATH, emacs would crash on startup saying DLLs are missing. [-- Attachment #2: Type: text/html, Size: 1034 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Fallback mode for image magick? 2013-07-07 9:28 ` Klaus-Dieter Bauer @ 2013-07-07 15:59 ` Eli Zaretskii 0 siblings, 0 replies; 18+ messages in thread From: Eli Zaretskii @ 2013-07-07 15:59 UTC (permalink / raw) To: Klaus-Dieter Bauer; +Cc: larsi, emacs-devel > From: Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com> > Date: Sun, 7 Jul 2013 11:28:12 +0200 > Cc: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org > > > Btw, statically linking against ImageMagick is a no-starter for > > Windows. But this can be fixed later, once the statically linked > > executable works. > > > > I guess there might be a misunderstanding in my compiling-vocabulary here; > What I meant is that I compiled with "--ldflags -static". I understood that you did something like that, so there's no misunderstanding. My point was that linking statically against ImageMagick is unacceptable as general-purpose build procedure for Windows, because the Windows build loads optional libraries dynamically when needed (and does not fail or crash if they are not available). Of course, for testing purposes, it is perfectly valid to try the static link, as a shortcut. > When I compiled this way, emacs would start without complaint when > any of the DLLs (including jpeg, png etc) were not available, which > is the behaviour I saw in binary releases for Windows. Your Emacs is statically linked against ImageMagick libraries, and all the libraries that ImageMagick depend on. That includes jpeg, png, etc. So it's a small wonder Emacs doesn't complain. > When I did not use the -static flag and removed the DLLs from PATH, emacs > would crash on startup saying DLLs are missing. Because ImageMagick depends on them. Without ImageMagick, when these DLLs are absent, there are no complaints (and no image support). ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-07-07 15:59 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-06-27 14:05 Fallback mode for image magick? Klaus-Dieter Bauer 2013-06-27 15:35 ` Lars Magne Ingebrigtsen 2013-06-27 16:17 ` Glenn Morris 2013-06-27 16:29 ` Klaus-Dieter Bauer 2013-06-27 17:34 ` Eli Zaretskii 2013-06-27 17:00 ` Glenn Morris 2013-06-28 12:15 ` Klaus-Dieter Bauer 2013-06-28 12:22 ` Lars Magne Ingebrigtsen 2013-07-01 22:00 ` Klaus-Dieter Bauer 2013-07-02 22:12 ` Klaus-Dieter Bauer 2013-07-06 15:31 ` Lars Ingebrigtsen 2013-07-06 15:52 ` Eli Zaretskii 2013-07-06 15:59 ` Lars Ingebrigtsen 2013-07-06 16:04 ` Eli Zaretskii 2013-07-07 9:22 ` Klaus-Dieter Bauer 2013-07-06 17:10 ` Glenn Morris 2013-07-07 9:28 ` Klaus-Dieter Bauer 2013-07-07 15:59 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).