Issue 82681 - GraphicExportFilter: JPEGs not completely drawn (using Java)
Summary: GraphicExportFilter: JPEGs not completely drawn (using Java)
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: programming (show other issues)
Version: OOo 2.3
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-17 00:39 UTC by ldenoue
Modified: 2017-05-20 11:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ldenoue 2007-10-17 00:39:52 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.
Comment 1 brian1830 2007-10-18 19:54:20 UTC
hi ldenoue,

could you post sample code that makes it easier for reproducing the issue? A
simple macro would do..

Thanks,
brian
Comment 2 ldenoue 2007-10-19 00:53:21 UTC
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.
Comment 3 ldenoue 2007-11-19 21:10:48 UTC
any progress on this?
I still have the problem.
Comment 4 christian.guenther 2008-04-03 13:16:21 UTC
Set to new and change the target.
Comment 5 christian.guenther 2008-04-03 13:20:42 UTC
According to jsk this could be your area.
Please have a look if you could reproduce the bug.
Comment 6 jsc 2008-04-03 14:17:42 UTC
jsc -> cl: as discussed per phone you will take care of this issue
Comment 7 Marcus 2017-05-20 11:29:44 UTC
Reset assigne to the default "issues@openoffice.apache.org".