Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Wed Jan 02, 2013 1:53 pm Post subject: Images corrupted when docx file opened in Neo
I have a batch of docx files created by someone else, that I work with each week. The documents include imbedded images. When I open them up in NeoOffice, the images are corrupted. (part the image is visible, but most of it has been erased) When opened with OpenOffice, whether on my Mac or the church's Windows Vista machine, the images appear fine.
I've attached screenshots of one such image, as it appears in Neo and OO.
The documents in question are purchased worship planning resources, so I don't feel comfortable attaching the document here, but I would be fine sending it to you by PM or the like if it would be helpful.
I'm using Neo 3.3 patch 3, test patch 9 [although the corruption issue started long before I installed test patch 9] on a Mac running OS 10.8.2.
Posted: Wed Jan 02, 2013 6:16 pm Post subject: Re: Images corrupted when docx file opened in Neo
Lorinda wrote:
The documents in question are purchased worship planning resources, so I don't feel comfortable attaching the document here, but I would be fine sending it to you by PM or the like if it would be helpful.
If you can't post it, then sending it to us privately is not an option as it exposes us to liability. In other words, if you don't have the rights to post it publicly, you probably don't have the rights to share it with us either so can you try the following?:
Can you delete all content except the image and see if the problem still occurs? If so, can you save and attach that "image only" document?
If the bug does not occur after deleting all of the content, can you reopen the full document and check if the image has "contour wrapping" enabled by right-clicking or Control-clicking on the image? In the popup menu that appears, is the Wrap :: Contour menu item checked? If so, does unchecking that menu item stop the problem from occurring?
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Wed Jan 02, 2013 6:52 pm Post subject:
I could almost certainly get permission from the publisher to send you a copy for testing purposes, but I'll hold off on that for now and try what you suggested.
I haven't yet deleted the text, but I did check on the wrap settings, and sure enough, "Contour" is checked. If I uncheck it, the image appears just as it should.
Before I found the "Contour" setting, if I change Wrap from "Page Wrap" to "no Wrap," the image corrects itself, and does not re-corrupt when set back to "No Wrap"
I'll work on getting you a test document that doesn't expose you to liability, and get back to you.
Lorinda
Last edited by Lorinda on Wed Jan 02, 2013 7:01 pm; edited 1 time in total
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Wed Jan 02, 2013 7:00 pm Post subject:
Was able to create a test document in Word at work. If I set the wrap in Word to "Tight," then I get the corruption in NeoOffice, until I turn of Contour or Wrapping.
Oddly, OpenOffice shows a completely blank image in my test document, until I turn off Contour, whereas with the original documents I was working with, OO showed the image correctly without my needing to make changes.
I'll haven't yet deleted the text, but I did check on the wrap settings, and sure enough, "Contour" is checked. If I uncheck it, the image appears just as it should.
When contour wrapping is enabled for an image, NeoOffice's underlying OpenOffice.org code tries create a "cutout" of the image by guessing which pixels can be removed based on each pixel's color.
I suspect that our code's handling of certain image formats is confusing the OpenOffice.org image contour detection code. So, I don't need the document. I only need the image file embedded within the original .docx.
Since you already posted a screen snapshot of the image, can you attach just the image? If so, can you open the original file, select the image, copy of it, paste it into a new, empty Writer document, and then enable contour wrapping? If the same bug occurs in the new document, then save the new document as an .odt file and attach that.
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Wed Jan 02, 2013 7:03 pm Post subject:
I think we cross-posted. Let me know if you'd like me to try what you suggest with the image in the new document I just posted, or with the earlier image.
I think we cross-posted. Let me know if you'd like me to try what you suggest with the image in the new document I just posted, or with the earlier image.
You are correct. I saw your sample document after I posted.
I can reproduce what you see in NeoOffice as well as in my Go-oo 3.1.1.1 build but not in OpenOffice.org 3.1.1 (the version of OpenOffice.org that NeoOffice 3.3 is based on) so I suspect that this is a bug in one of the modifications made to the OpenOffice.org code by Novell's Go-oo engineers.
I will investigate and see if I can track down the Go-oo modification that causes this corrupted counter wrap image drawing.
I finally found the OpenOffice.org code that tries to figure out the contour shape for an image. I originally thought that the unexpected contour shape that you were seeing was due to a Go-oo modication, but instead I found that this problem occurs in all versions of OpenOffice.org and LibreOffice.
When the contour setting is enabled for an image, NeoOffice's underlying OpenOffice.org code converts white and near white pixels to transparent pixels. I think that I have fixed this contour bug in the following test patch by severely limiting what colors are considered "near white".
With this change, the image in your sample document looks the same whether or not the contour setting is enabled. This is the same behavior as in Microsoft Word. In contrast, in the attached document, the ship image that I added has a white background so when the contour setting is enabled for that image, the contour shape is very close to the shadow edges in the image.
Can you install the following test patch and tell us in the contour setting works correctly for your images?:
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Mon Jan 14, 2013 5:38 pm Post subject:
Sorry for the delay in getting back to you. I didn't have my work laptop up and running Saturday, and then a family member came down with influenza, so I'm a bit behind. The patch improves things greatly. I still see some distortion/corruption along the edges of certain images, but it's MUCH better.
In the test document, the grey shading around the Neo icon is ragged until I turn contour off--image attached. At large resolution, some raggedness is visible along the edges of the measuring cup image, until contour is turned off.
Working with the documents that originated my inquiry, they are much better; some show no "corruption" others a very minimal amount, depending on the amount of white/near white near the edges of the images.
Now that I know to turn contour off, it's all very manageable. Thanks for your hard work!
In the test document, the grey shading around the Neo icon is ragged until I turn contour off--image attached. At large resolution, some raggedness is visible along the edges of the measuring cup image, until contour is turned off.
I see this too. It appears that the OpenOffice.org code converts all semi- transparent pixels to fully transparent or opaque when the contour setting is enabled.
I suspect that this is another case of where the OpenOffice.org code doesn't expect transparent pixels. Many places in the OpenOffice.org code assume that images have no transparent pixels.
I will look at the OpenOffice.org code and see if this is something that can be fixed.
Perhaps the problem was not the pixels taken on as near-white, but that those pixels should have been really transparent, and that was neverin the codebase. _________________ "What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Perhaps the problem was not the pixels taken on as near-white, but that those pixels should have been really transparent, and that was neverin the codebase.
Most likely you are correct. That is definitely the case with the ship image that is the sample document that I posted earlier in this forum topic. The ship's shadow are all the same color and the fading effect when contour is off is comes from pixels on the outer edge of the shadow having a higher transparency value than the inner edge pixels.
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Tue Jan 15, 2013 6:50 pm Post subject:
I still see a few artifacts/jagged edges near the rightmost flag of the ship, but aside from that, it looks great. I checked several of the documents that first led me to reporting this, and they look excellent.
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