Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | GraphicExportFilter: JPEGs not completely drawn (using Java) | ||
---|---|---|---|
Product: | Draw | Reporter: | ldenoue <ldenoue> |
Component: | programming | Assignee: | AOO issues mailing list <issues> |
Status: | CONFIRMED --- | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, kpalagin, whooey1830 |
Version: | OOo 2.3 | ||
Target Milestone: | AOO Later | ||
Hardware: | All | ||
OS: | Linux, all | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
ldenoue
2007-10-17 00:39:52 UTC
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". |