You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/03/06 15:01:22 UTC

[Bug 121858] New: GraphicProvider: document its capability to scale, crop and change the image resolution

https://issues.apache.org/ooo/show_bug.cgi?id=121858

            Bug ID: 121858
        Issue Type: DEFECT
           Summary: GraphicProvider: document its capability to scale,
                    crop and change the image resolution
    Classification: Unclassified
           Product: App Dev
           Version: AOO 3.4.1
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: normal
          Priority: P3
         Component: api
          Assignee: issues@openoffice.apache.org
          Reporter: arielch@apache.org
                CC: issues@openoffice.apache.org

When you store a css::graphic::XGraphic using the css::graphic::GraphicProvider
service, you can set some filter settings in the "FilterData" passed among the
css::graphic::MediaProperties to
css::graphic::XGraphicProvider::storeGraphic().

Before passing the graphic to the GraphicFilter, among with the FilterData, the
GraphicProvider performs some interesting task like cropping, scaling, and
changing the image resolution, depending on some extra properties set on the
FilterData:

- cropping:

"GraphicCropLogic" - css::text::GraphicCrop
"RemoveCropArea" - boolean

- scaling:

"PixelWidth" - long
"PixelHeight" - long

- resolution

"LogicalSize" - css::awt::Size
"ImageResolution" - long


As documented in ImplApplyFilterData:
http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/graphic/provider.cxx?revision=1431512&view=markup#l596
this method applies following attributes to the graphic, in the first step the
cropping area (logical size in 100thmm) is applied, in the second step the
resolution  is applied, in the third step the graphic is scaled to the
corresponding pixelsize. if a parameter value is zero or not available the
corresponding step will be skipped 

This should be document somewhere, may be in 
http://www.openoffice.org/api/docs/common/ref/com/sun/star/graphic/XGraphicProvider.html#storeGraphic
or
http://www.openoffice.org/api/docs/common/ref/com/sun/star/graphic/MediaProperties.html#FilterData

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121858] GraphicProvider: document its capability to scale, crop and change the image resolution

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121858

--- Comment #1 from Ariel Constenla-Haile <ar...@apache.org> ---
This seems to be internally available since 2007, while fixing bug 72365 and
bug 76451 :

http://hg.services.openoffice.org/OOO340/rev/a3e6dfb33340
author    obo
    Tue Jan 23 08:55:14 2007 +0000 (2007-01-23)
changeset 185172    a3e6dfb33340
parent 185171     fe3a14004e23
child 185173     9d530b41ba39
INTEGRATION: CWS impress115 (1.9.18); FILE MERGED
2007/01/16 11:10:13 sj 1.9.18.2: #i72365# storeGraphic of the GraphicProvider
is now able to resize the Graphic as it is also possible with the
GraphicExporter (now without changing the original graphic)
2006/12/07 15:54:14 sj 1.9.18.1: #i72365# storeGraphic of the GraphicProvider
is now able to resize the Graphic as it is also possible with the
GraphicExporter 

http://hg.services.openoffice.org/OOO340/rev/d84c7119acc9
author    kz
    Thu May 10 09:14:35 2007 +0000 (2007-05-10)
changeset 192004    d84c7119acc9
parent 192003     80d88acba4e5
child 192005     4c9ada99bd4a
INTEGRATION: CWS impress120_SRC680 (1.9.26.1.4); FILE MERGED
2007/04/17 15:06:35 sj 1.9.26.1.4.1: #i76451# fixed stream seeking problem when
storing certain kind of graphics (vclmetfile, wmf..)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.