Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
Uwe Stöhr wrote: > Am 30.11.2015 um 22:30 schrieb Georg Baum: > >> 1) ImageMagick has a raster image kernel, it would be a huge effort to >> add vector graphics capabilities, and I doubt that this is even a goal of >> the ImageMagick authors > > Well, it can convert from and to PDF and EPS via Ghostscript libraries > keeping the vector information. http://www.imagemagick.org/Usage/formats/#vector tells something else: Why is this important? Because IM is a 'raster image processor', and while it can read or write images stored in one of the vector formats it does so by converting the image to and from a internal raster image. Consequently if you are trying to convert a image from a vector format, to another vector format, IM will essentially rasterize this image at the currently defined resolution or density which will hopefully (but unlikely) be suitable for the output device you intend to use it on. > Interesting. Many thanks! > I am still wondering why metafile2eps required admin permissions (I > assume because it has to be installed as printer). This is the reason: Installing printers requires admin permissions. > This restriction > annoyed me and users too. I mean I spent much time to get LyX to be > installable without admin permissions and non-admin LyX users could not > benefit from Metafile2eps. > Now I got feedback that Metafile2eps makes problems on some Win 10 PCs > (I don't have Win 10 to test). Thus I had to make a decision. Since > metafile2eps is not part of LyX, I thought it is up to me what so > support via the installer. At least until now nobody commented my > third-party specific installer changes. Yes, most installer changes are not of interest for anybody besides you, but sometimes there are exceptions;-) Georg
Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
On Thu, Dec 03, 2015 at 10:15:53PM +0100, Georg Baum wrote: > Uwe Stöhr wrote: > > Thus I had to make a decision. Since > > metafile2eps is not part of LyX, I thought it is up to me what so > > support via the installer. At least until now nobody commented my > > third-party specific installer changes. > > Yes, most installer changes are not of interest for anybody besides you, but > sometimes there are exceptions;-) I would be interested in helping make decisions if you write up a description of what the problem is, your preferred solution, the advantage of your solution, and alternative ways to address the problem. This way even people who can't experience the problem themselves can provide feedback. This would also lead to informative commit messages. Scott signature.asc Description: PGP signature
Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
Am 30.11.2015 um 22:30 schrieb Georg Baum: 1) ImageMagick has a raster image kernel, it would be a huge effort to add vector graphics capabilities, and I doubt that this is even a goal of the ImageMagick authors Well, it can convert from and to PDF and EPS via Ghostscript libraries keeping the vector information. 2) metafile2eps does not contain the conversion code. The conversion code is in windows itself, which makes it unsuitable for ImageMagick (it is cross platform). To understand why that is the case one needs to know a bit of the wmf/emf file formats. They are not like most file formats, where the contents is stored as individual objects (e.g. a green rectangle of a certain size). Instead, the contents is stored as a transcript of windows API calls to create the desired objects. This makes id dead easy for developers to support wmf/emf export and display on windows: For export you call the same routine that draws your vector graphic on screen, but with a different so called "device context" that is associated with a EMF file. To display a EMF file you call a windows API function to "replay" it. However, if you want to convert the contents into your own data structures, you basically have to replicate a lot of drawing logic from windows. The same is true if you want to export to an EMF file without calling windows API functions. Interesting. Many thanks! I am still wondering why metafile2eps required admin permissions (I assume because it has to be installed as printer). This restriction annoyed me and users too. I mean I spent much time to get LyX to be installable without admin permissions and non-admin LyX users could not benefit from Metafile2eps. Now I got feedback that Metafile2eps makes problems on some Win 10 PCs (I don't have Win 10 to test). Thus I had to make a decision. Since metafile2eps is not part of LyX, I thought it is up to me what so support via the installer. At least until now nobody commented my third-party specific installer changes. But to keeping the vector information is easy: Inkscape Attached is a patch This is indeed great news! Some years ago this was not possible. I just tried, it works even on linux, although some more adavanced EMF features are only available in the very latest inkscape version (which I do not have yet). The patch looks good to me. If this is in I am have no objections to remove metafile2eps from the installer anymore. OK, I put in in. regards Uwe
Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
Am 30.11.2015 um 21:39 schrieb Alex Vergara Gil: In Windows when you press Ctrl+C in an Office graphics you obtain an emf file in your pastebin, so when trying to place it in LyX you will be unsuccessful, so I always has to put it into mspaint and save it as png. So it would be a good idea to have a native automatic transformation from emf to eps. Since years the LyX installer installs metafile2eps as printer. So this printer should do the conversion for you so that you should already be able to copy emf from the pastebin directly to LyX. if this is not the case, please open a LyX bug report. (the change discussed here will first become active for LyX 2.2.0) thanks and regards Uwe
Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
In Windows when you press Ctrl+C in an Office graphics you obtain an emf file in your pastebin, so when trying to place it in LyX you will be unsuccessful, so I always has to put it into mspaint and save it as png. So it would be a good idea to have a native automatic transformation from emf to eps. Regards Alex 2015-11-29 20:34 GMT-05:00, Uwe Stöhr: > Am 30.11.2015 um 01:57 schrieb Andrew Parsloe: > >> When I discovered LyX about ten years ago, I saved my Word 95 documents >> as rtf and used rtf2latex2e to convert them to latex so that they could >> be imported into LyX. The figures in the Word documents were separated >> out by rtf2latex2e into wmf files. > > Interesting. So word is using WMF for RTF. I have to use Word every day > and never noticed this. > > regards Uwe >
Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
Uwe Stöhr wrote: > Am 28.11.2015 um 11:15 schrieb Georg Baum: > >> If there are problems with the installation then please ask on the list >> for help and opinions. > > I am the only Win developer here. My spare time is limited and the > installer consumes a lot of time. > The installer is there to provide a fully functional LyX, no matter if > installed with admin privileges or not. Metafile2eps was not available > without admin privileges. I understand that you do not want to invest time into such installation issues. However, I still think that it is better to discuss such changes on the list first. Nobody knows everything, and even if you do not see any other solution than dropping something from the installer, it is possible that there are others who have a much better idea. For example, I have windows development experience myself. > Besides this, why should I invest my time to get this program working > while it is not part of LyX and not under development for 7 years now? > If emf conversion is important why is metafile2eps not developed > anymore. I already answered that question in the text cited below. > If the creator doesn't have time, he could contribute his code > to e.g. ImageMagick that this program is able to convert keeping the > vector information. No, for two reasons: 1) ImageMagick has a raster image kernel, it would be a huge effort to add vector graphics capabilities, and I doubt that this is even a goal of the ImageMagick authors 2) metafile2eps does not contain the conversion code. The conversion code is in windows itself, which makes it unsuitable for ImageMagick (it is cross platform). To understand why that is the case one needs to know a bit of the wmf/emf file formats. They are not like most file formats, where the contents is stored as individual objects (e.g. a green rectangle of a certain size). Instead, the contents is stored as a transcript of windows API calls to create the desired objects. This makes id dead easy for developers to support wmf/emf export and display on windows: For export you call the same routine that draws your vector graphic on screen, but with a different so called "device context" that is associated with a EMF file. To display a EMF file you call a windows API function to "replay" it. However, if you want to convert the contents into your own data structures, you basically have to replicate a lot of drawing logic from windows. The same is true if you want to export to an EMF file without calling windows API functions. > But to keeping the vector information is easy: Inkscape > Attached is a patch This is indeed great news! Some years ago this was not possible. I just tried, it works even on linux, although some more adavanced EMF features are only available in the very latest inkscape version (which I do not have yet). The patch looks good to me. If this is in I am have no objections to remove metafile2eps from the installer anymore. >> To my knowledge, there was no development needed, and it simply works >> also for newer windows versions, but Enrico can certainly tell more. > > It never "simply" worked. It was not available for those who install LyX > without admin permissions and made troubles when LyX was uninstalled. I meant the converter itself, not the installation. > Interestingly I could not find a single emf file on my PC. I also never > stumbled over this image format at work. > I downloaded now one and it appears that no browser can display this > file format. So I am wondering what program created emf natively. All windows programs that deal with vector graphics I have seen so far can create it, including exotic ones like DynaGeo, where it is the only possibility to export vector graphics. BTW, as fas as LyX is concerned, the differences between emf and wmf do not matter. Georg
Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
Am 30.11.2015 um 01:57 schrieb Andrew Parsloe: When I discovered LyX about ten years ago, I saved my Word 95 documents as rtf and used rtf2latex2e to convert them to latex so that they could be imported into LyX. The figures in the Word documents were separated out by rtf2latex2e into wmf files. Interesting. So word is using WMF for RTF. I have to use Word every day and never noticed this. regards Uwe
Re: [patch] use inkscape for EMF and WMF was: [LyX/master] installer: install Qt plugin DLLs correctly
On 30/11/2015 11:39 a.m., Uwe Stöhr wrote: Interestingly I could not find a single emf file on my PC. I also never stumbled over this image format at work. I downloaded now one and it appears that no browser can display this file format. So I am wondering what program created emf natively. regards Uwe When I discovered LyX about ten years ago, I saved my Word 95 documents as rtf and used rtf2latex2e to convert them to latex so that they could be imported into LyX. The figures in the Word documents were separated out by rtf2latex2e into wmf files. Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus