Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Download or installation problems? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - Save EPS images in .doc and .docx files
Save EPS images in .doc and .docx files
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NeoOffice Forum Index -> NeoOffice New Feature Requests
View previous topic :: View next topic  
Author Message
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Tue Mar 27, 2012 8:10 am    Post subject: Reply with quote

Actually, Word takes some bitmap formats, just not very many of them.

So, you might want to try if you can convert your image to enhanced metafile (EMF), which Word can read.

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 8:25 am    Post subject: Reply with quote

ovvldc wrote:
Actually, Word takes some bitmap formats, just not very many of them.

So, you might want to try if you can convert your image to enhanced metafile (EMF), which Word can read.


I think you misunderstand how NeoOffice renders EPS images. We do not do any conversion. Instead, we pass the raw EPS image bits to Mac OS X's native image rendering functions and those functions render the EPS image directly to our windows or to a bitmap depending on the situation.

From my experience, all of the Mac OS X image conversion functions convert in only in the following ways:

1. Native Mac drawing instructions when drawing an image to a window

2. Bitmap format when drawing an image to an offscreen image buffer

In other words, Mac OS X has no functions for converting the EPS vector drawing instructions to Microsoft's EMF drawing instructions so the only EMF image that you can get from NeoOffice is an EMF image that contains only one thing: a bitmap of the EPS image.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 9:11 am    Post subject: Reply with quote

I forgot to add in my last post that while neither Mac OS X nor NeoOffice have any ability to convert EPS images to Microsoft's EMF image format, I have heard that newer versions of Adobe Creative Suite may be to do that conversion.

I cannot confirm that this is true as I don't have Adobe Creative Suite but if you have Adobe Creative Suite, you might want to try exporting your EPS images to EMF image format and then inserting the EMF image into your NeoOffice document. NeoOffice will then include the EMF vector image when you save as a .doc or .docx file since Word supports EMF in both their Windows and Mac versions.

Note, however, that EPS and EMF are competing image formats. Adobe created EPS to push sales of their software products and Microsoft created EMF to try and prevent Adobe from controlling the image processing software market so you should be prepare for some incompatibilities when converting EPS to EMF.

Patrick
Back to top
View user's profile Send private message Visit poster's website
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Tue Mar 27, 2012 9:30 am    Post subject: Reply with quote

I am sure there are less expensive ways, but unless the graph is fairly basic, you may find issues.

google search

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 9:40 am    Post subject: Reply with quote

While writing an EPS to EMF converter would be a massive project for us, it might be feasible for us to modify NeoOffice's underlying OpenOffice.org code to automatically convert the EPS to a bitmap image format when saving to a .doc or .docx file.

I am interested in what morgana or ovvldc think of this approach. The question is whether or not exporting a bitmap and losing the vector image properties in the EPS is better than the current behavior.

Patrick
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Tue Mar 27, 2012 10:31 am    Post subject: Reply with quote

pluby wrote:
I forgot to add in my last post that while neither Mac OS X nor NeoOffice have any ability to convert EPS images to Microsoft's EMF image format

Are you sure Neo can't do this? According to the NeoDraw supported formats page (see the "Vector Formats" section), Draw can open EPS and export EMF, so there's got to be some way of Draw doing this (at least as a two-step process, EPS->Draw/ODG->EMF) unless newer versions of OOo have dropped either the import or export filters (I haven't updated that page in a few versions Sad ).

That's not to say that it would be easy, or even possible, to hook up, but it does seem like it would be possible theoretically.

(Also, I was pretty sure Word on the Mac used to support EPS--there was some blow-up about something related to it--but my memory is fuzzy and I don't have time to look it up right now.)

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 10:45 am    Post subject: Reply with quote

sardisson wrote:
Are you sure Neo can't do this? According to the NeoDraw supported formats page (see the "Vector Formats" section), Draw can open EPS and export EMF, so there's got to be some way of Draw doing this (at least as a two-step process, EPS->Draw/ODG->EMF) unless newer versions of OOo have dropped either the import or export filters (I haven't updated that page in a few versions Sad ).


Yes I am sure. I implemented this code myself if you remember. What do you think is displayed in Draw? As I said in my previous post, the Mac OS X functions only support drawing directly to a Window or drawing to a bitmap offscreen. In other words, what you see in draw is the bitmap generated by Mac OS X's drawing functions and is why EPS images are not editable within Draw.

sardisson wrote:
(Also, I was pretty sure Word on the Mac used to support EPS--there was some blow-up about something related to it--but my memory is fuzzy and I don't have time to look it up right now.)


Word on Mac converts EPS files to bitmap images when you insert the image. I already checked this before I posted my first post.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 12:02 pm    Post subject: Reply with quote

So I would like to get back to the original question in this topic: it might be feasible for us to modify NeoOffice's underlying OpenOffice.org code to automatically invoke the Mac OS X EPS to bitmap conversion code when saving to a .doc or .docx file.

Apple's QuickTime engineers have not implemented such vector image to vector image conversion support so converting directly from EPS to EMF is not remotely feasible for us. So, the question is do any donors want to see a bitmap rendering of the EPS in their .doc and .docx files even though the conversion to bitmap will cause any vector drawing in the EPS image to be lost?

Patrick
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Tue Mar 27, 2012 1:33 pm    Post subject: Reply with quote

Not to side-track things, but there's a difference between what gets displayed on screen (which is a bitmap everywhere, essentially) and what gets embedded in a document, right? (Although ultimately it's not going to matter in this case, due to OOo limitations.)

(Also, according to this, Office 2008 still kept the vector image in the document so that printing used the high-quality vector, not the low-quality on-screen bitmap. I don't have Office, so I can't back up that claim, however, and again that's not going to help here due to OOo limitations.)

That said, although Draw claims that any EPS files are still "metafiles", it appears that exporting them to other vector/metafile formats produces empty results. So, indeed, there is no OOo code to take the EPS vector data and transform it into any other vector format (and the OOo export code can't even seem to get at the bitmap that your code/Mac OS X provides to display on screen, in order to include an embedded bitmap in the vector output).

I didn't have Neo around earlier when I made the suggestion, so I couldn't test; but you're definitely right, EPS->EMF (or any vector format) is not possible. Smile

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 1:49 pm    Post subject: Reply with quote

sardisson wrote:
Not to side-track things, but there's a difference between what gets displayed on screen (which is a bitmap everywhere, essentially) and what gets embedded in a document, right? (Although ultimately it's not going to matter in this case, due to OOo limitations.)


The original, unmodified EPS image bits are preserved in .odt, .odp, etc. documents and those bits are essentially passed directly to the Mac OS X rendering functions (the NSEPSImageRep class to be exact) to render to the screen or printer.

sardisson wrote:
(Also, according to this, Office 2008 still kept the vector image in the document so that printing used the high-quality vector, not the low-quality on-screen bitmap. I don't have Office, so I can't back up that claim, however, and again that's not going to help here due to OOo limitations.)


Maybe that is true but remember that even if the OpenOffice.org code could push the raw EPS bits into a .doc or .docx file, EPS is largely unreadable by Windows and most Windows printer drivers so a bitmap is needed to see any image with Microsoft Office (and even OpenOffice.org) on Windows.

Patrick
Back to top
View user's profile Send private message Visit poster's website
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Tue Mar 27, 2012 2:40 pm    Post subject: Reply with quote

I never meant to suggest write a converter. I merely meant that the author of the original topic convert the graphic, and then maybe embed them. Or send them along separately.

Funny, actually. There are several programs to do this on windows, says wikipedia. But not for Mac Sad.

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 3:51 pm    Post subject: Reply with quote

ovvldc wrote:
I never meant to suggest write a converter. I merely meant that the author of the original topic convert the graphic, and then maybe embed them. Or send them along separately.


I assume that is what you meant. To me, the next reasonable question that users might ask would be why can't NeoOffice converter between different vector image formats as well as a related question of why there are no obvious solution to this problem so I essentially jumped ahead and answered that unasked question.

Essentially, the core problem here is that vector image formats like EPS and PDF are really great for preserving highly scalable images but their downside is that - either by intent or accident is unclear to me - editing and/or converting them is significantly more difficult than doing the same with bitmaps.

I am confident that I can push a bitmap into .doc and .docx since that is what is already happening when you export to PDF a document that has an EPS in it. I just need to find where in the .doc and .docx export code I need copy my code that renders EPS to bitmap to when exporting PDF.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Tue Mar 27, 2012 4:25 pm    Post subject: Reply with quote

sardisson wrote:
(Also, according to this, Office 2008 still kept the vector image in the document so that printing used the high-quality vector, not the low-quality on-screen bitmap. I don't have Office, so I can't back up that claim, however, and again that's not going to help here due to OOo limitations.)


FYI. I tested this in Microsoft Word 2005 on my Mac OS X 10.5.8 machine and I can confirm that if you use Word's Insert :: Picture menu to insert an EPS image file, the EPS image will be stored in the .doc file. However, like NeoOffice, Word appears to render the image using Mac OS X's functions. Worse, when you reopen a .doc file with an EPS image in it, the EPS image is blank while a "converting EPS" dialog appears momentary and then a bitmap of the image is rendered on screen.

I could not verify that the original EPS is used when printing as I see pixelation in the print output. But then maybe my HP printer does not support PostScript.

Patrick
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Tue Mar 27, 2012 10:19 pm    Post subject: Reply with quote

Thanks for the explanations, Patrick!

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11857
Location: California, USA

PostPosted: Wed Mar 28, 2012 11:37 am    Post subject: Reply with quote

FYI. I implemented exporting EPS images as 300 DPI bitmaps when saving to .doc and .docx. A test patch is in this post.

Patrick
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NeoOffice Forum Index -> NeoOffice New Feature Requests All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.03 Seconds