Apache OpenOffice (AOO) Bugzilla – Issue 82681
GraphicExportFilter: JPEGs not completely drawn (using Java)
Last modified: 2017-05-20 11:29:44 UTC
when I export pages of an Impress document using GraphicExportFilter, sometimes the JPEGs are not completely drawn (black bands on the right and/or bottom of the image). for example: http://citi.mass.edu/documents/Accreditation_presentation%5B1%5D.ppt images of exported pages 2, 4, 6-11 all contain dark bands.
hi ldenoue, could you post sample code that makes it easier for reproducing the issue? A simple macro would do.. Thanks, brian
Here is the code, from Java. Note that openoffice 2.0 works, but openoffice 2.3 generates some dark images. So I don't think it comes from my code, unless the API has changed and I need to do something else? objectDocumentToStore = xcomponentloader.loadComponentFromURL( stringUrl, "_blank", 8, propertyvalue ); XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, objectDocumentToStore); XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages(); Object GraphicExportFilter = xcomponentcontext.getServiceManager().createInstanceWithContext("com.sun.star.drawing.GraphicExportFilter", xcomponentcontext ); XExporter xExporter = (XExporter) UnoRuntime.queryInterface( XExporter.class, GraphicExportFilter ); XFilter xFilter = (XFilter) UnoRuntime.queryInterface( XFilter.class, xExporter ); PropertyValue aFilterData_thumb[] = new PropertyValue[3]; aFilterData_thumb[0] = new PropertyValue(); aFilterData_thumb[0].Name = "PixelWidth"; aFilterData_thumb[0].Value = 320; aFilterData_thumb[1] = new PropertyValue(); aFilterData_thumb[1].Name = "PixelHeight"; aFilterData_thumb[1].Value = 240; aFilterData_thumb[2] = new PropertyValue(); aFilterData_thumb[2].Name ="Quality"; aFilterData_thumb[2].Value = jpeg_quality; PropertyValue aProps_thumb[] = new PropertyValue[3]; aProps_thumb[0] = new PropertyValue(); aProps_thumb[0].Name = "MediaType"; aProps_thumb[0].Value = "image/jpeg"; aProps_thumb[1] = new PropertyValue(); aProps_thumb[1].Name = "URL"; aProps_thumb[2] = new PropertyValue(); aProps_thumb[2].Name = "FilterData"; aProps_thumb[2].Value = aFilterData_thumb; int thumbheight = 240; int npages = xDrawPages.getCount(); for (int i=0;i<npages;i++) { XDrawPage xPage = (XDrawPage)UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex( i )); com.sun.star.beans.XPropertySet xPageProps = (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xPage); int pageWidth = com.sun.star.uno.AnyConverter.toInt(xPageProps.getPropertyValue("Width")); int pageHeight = com.sun.star.uno.AnyConverter.toInt(xPageProps.getPropertyValue("Height")); thumbheight = (320*pageHeight)/pageWidth; aFilterData_thumb[1].Value = thumbheight; XComponent xComp = (XComponent) UnoRuntime.queryInterface( XComponent.class, xPage ); xExporter.setSourceDocument( xComp ); aProps_thumb[1].Value = "file:///tmp/image-" + i + ".jpg"; xFilter.filter( aProps_thumb ); } Laurent.
any progress on this? I still have the problem.
Set to new and change the target.
According to jsk this could be your area. Please have a look if you could reproduce the bug.
jsc -> cl: as discussed per phone you will take care of this issue
Reset assigne to the default "issues@openoffice.apache.org".