Issue 121749 - Add ability to chose the method, which is used to stretch images
Summary: Add ability to chose the method, which is used to stretch images
Status: UNCONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: PC Windows 7
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-10 19:13 UTC by Regina Henschel
Modified: 2017-05-20 11:28 UTC (History)
2 users (show)

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


Attachments
Stretching of bitmaps (16.38 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-10 19:13 UTC, Regina Henschel
no flags Details
Test Kit (15.07 KB, application/x-zip-compressed)
2013-05-16 05:32 UTC, Rainer Bielefeld
no flags Details
Example file containing a chart with metafile fills (29.83 KB, application/vnd.oasis.opendocument.graphics)
2013-05-16 15:47 UTC, Armin Le Grand
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2013-02-10 19:13:19 UTC
Created attachment 80249 [details]
Stretching of bitmaps

Use a bitmap, that has a smaller size as the object for the background of the object.
Set a stretching mode, for example "Relative 100%" or "Autofit".

Notice, that always intermediate colors are calculated for a smooth color transition. This is independent of the check box "Use Anti-Aliasing" in the settings.

This might be fine for photos, but if you will use such image to mark areas in a chart, you want a sharp threshold line. That was the result in older versions, e.g. OOo2.4.3.

My request is, to allow the user to set the method of stretching in the property dialog of the area, together with the other fill rules. For example "smooth color transition" vs. "without color transition".
Comment 1 Rainer Bielefeld 2013-05-16 05:32:00 UTC
Created attachment 80694 [details]
Test Kit

I did some tests with server installation of  "AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1482523 Rev.1482259 (2013-05-15)]" on WIN7 Home Premium (64bit)", own separate user profile
I am not 100% sure whether I understand the intentions of the request.

I exported the small tricolore source square from my sample.odg document to a sample.bmp and used sample.bmp for some tests.

* Left 200mm height rectangle: stretched source, shows sharp threshold line
* Middle 200mm height rectangle: Rectangle with autofit filling sample.bmp,
  shows blurry threshold line
* Right 200mm height rectangle: Stretched sample.bmp, already shows 
  blurry threshold line 
* sample.bmp imported. With big zoom (and also using irfan view for sample.bmp)
  oyu will see that already the exported raster graphic has those blurry lines, 
  what with big magnification already look like a gradient.

I think the main reason for the blurry threshold lines in the rectangles with big height in my example.odg is that already the exported .bmp has these blurry threshold lines different from the source.

@Regina: What do you think?
Comment 2 Armin Le Grand 2013-05-16 09:45:07 UTC
ALG: The fill information is interpolated when used, in the case where it needs to be stretched and in the case where it needs to be compacted (which is even more important sometimes). I see this as technical advancements, adding a mode where this is not done would
- Increase the complexity of the renderers
- Lead to errors (another flag which may be forgotten in all exporters/renderers)
- Lead to errors when making smaller (pixels will 'vanish' with no control which ones when not interpolating in this case)

All this can be 'worarounded' by simply preparing bitmaps with enough resolution, even when not much colors are used. Thus, I would not support to start to add such a feature.
Comment 3 Armin Le Grand 2013-05-16 10:48:46 UTC
ALG: Another hint: When the costs for a bigger bitmap seem to high for this, just use a vector-based fill graphic, e.g. metafile or SVG. All graphic types are valid fill types for AOO4.0. It is even possible to do this from scratch:

- New draw/Impress
- insert shape you want to fill
- create any fill you want using other shapes besides it
- select these fill shapes, convert to metafile
- start D&D (button down, wait until mouse cursor changes)
- drop on to-be-filled shape, hold CTRL+SHIFT pressed
-> to-be-filled shape is filled with metafile

HTH!
Comment 4 Armin Le Grand 2013-05-16 15:35:46 UTC
ALG: Also handy is to move fill objects to the gallery (to My theme), D&D them from there to to-be-filled objects, also holding CTRL+SHIFT.

For chart it's more complicated (no gallery)
- create fill object(s), convert to metafile
- export to *.svm (do not forget to check the 'selection' checkbox)
- create a fill style with it in the Area dilaog in the Bitmaps tab using 'import'
- activate chart, change fill style to created one.

We really need to think about a simpler way to add Area FillStyles...
Comment 5 Armin Le Grand 2013-05-16 15:47:42 UTC
Created attachment 80699 [details]
Example file containing a chart with metafile fills

ALG: The example shows how to use vector-based fills for chart; these will scale completely resolution-independent in all cases.
Comment 6 Armin Le Grand 2013-05-27 09:40:21 UTC
ALG: Regina, I assume/hope you are happy with the shown solution which solves the case asked for better than a bitmap graphic does, can I close this one?
Comment 7 Armin Le Grand 2013-06-05 09:45:57 UTC
.
Comment 8 Marcus 2017-05-20 11:28:06 UTC
Reset assigne to the default "issues@openoffice.apache.org".