Created attachment 175765 [details] ODP Sample File In Impress, applying the Soft Edges effect distorts the entire image instead of only softening the edges (while keeping the rest of the image intact). Distortion can be noted during presentation as well as while editing the slides. However, the exported PDF does not seem to have the problem. I created two test files: 1) The "ODP Sample File" has two slides. In each of them I used the same image twice (the first without the effect and the second with the effect). In presentation mode, notice in the highlighted parts that the image is actually a bit distorted. 2) The "PDF Sample File" is the PDF exported from the ODP file. In the PDF file I do not see any distortion... so this might have something to do with rendering. System info: Version: 7.2.2.2 / LibreOffice Community Build ID: 20(Build:2) CPU threads: 16; OS: Linux 5.11; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Ubuntu package version: 1:7.2.2~rc2-0ubuntu0.21.04.1~lo1 Calc: threaded
Created attachment 175766 [details] PDF Sample File
BTW, when exporting as PDF the quality of the images is significantly worsened and pixelated (both with and without the soft edges effect). So I guess the PDF part of my original report has nothing to do with Soft Edges, but rather with general poor image quality export.
I have tested it in Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: a3416ed058884a1fcaae0659ff6e71f5a7dff8d0 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (en_US); UI: en-US Calc: threaded I have tested too without Skia. I see no problems, neither in show mode nor in pdf. Can you please be more specific about "distortion".
Please add a simpler example, I don't see the problem in your files anyway
Created attachment 175798 [details] ODP Sample File - Ex 2 I created another example that better illustrates the distortion I am seeing and uploaded it both as ODP and PDF. This time around I used a polygon-based image. In the first slide I added the original image without any effects. In the second slide I applied the Soft Edges effect. The distortion can be seen both in edit and presentation modes.
Created attachment 175799 [details] PDF Sample File - Ex 2 Notice that the distortion also appears in the PDF file.
In Slide 2 of the new sample files I wrote "Without Soft Edges Effects" but what I meant is "With Soft Edges Effects". So, the correct text is: Slide 1: Without Effects Slide 2: With Soft Edges Effects
Created attachment 175800 [details] Screenshot: left part with soft edge, right part without I see no problem. With and without soft edge looks the same to me. The screenshots are from Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 93115d2c54d645bcf2f80fde325e3ede39dee4d5 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (en_US); UI: en-US Calc: CL
Created attachment 175801 [details] Screenshot (left side has Soft Edges effect) Hi Regina! Thanks for your help with this issue. Indeed in your screenshot there's no visible distortion. So, I upload a screenshot of what I'm seeing. Note that the image in the right is more pixelated. This test was done in KDE using LO 7.3 alpha, but I had the same results in Windows. Can this be related to graphics card maybe? I use Nvidia in both my PCs.
Created attachment 176275 [details] Video capture showing the bug This video capture shows how soft edge distorts the image. Notice that when I switch from radius 0 to 1 the image gets distorted. When I get back to 0 the image is restored.
@Mike, what do you think of this issue while applying soft edges. See video in Comment 9 for more details of how the effect is distorting the image.
(In reply to Rafael Lima from comment #11) > @Mike, what do you think of this issue while applying soft edges. I didn't check the code, but I (seem to) remember there was some pixel count limit, after which we limit the image quality to avoid freezing. This *might* be that.
I can see the problem with attachment 175798 [details] on Windows in presentation mode, using Version: 7.4.0.1 (x64) / LibreOffice Community Build ID: 43e5fcfbbadd18fccee5a6f42ddd533e40151bcf CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: default; VCL: win Locale: en-US (ru_RU); UI: en-US Calc: CL (and also using Skia rendering on the same system). With Skia, the resulting view is blurred; with default render and disabled AA / HW acceleration, the view is pixelated. Indeed, as I suspected, we do have a code to down-sample bitmaps: VclMetafileProcessor2D::CreateBufferDevice [1] that checks that the image for effect processing has no greater than 500 000 pixels (which is around 707x707 pixel bitmap). But unexpectedly, this downsampling didn't trigger in this case! The bitmap size is calculated from the passed logical object range, which is 14730x15750 units. These units are converted to pixels using OutputDevice::LogicToPixel, and the result is 557x596 pixels. This value is independent on the screen resolution; it seems that VclMetafileProcessor2D uses the object's logical size (which is, for the image with effect, 14.73x15.75 cm = 14730x15750 mm/100 units that are used internally). It is converted using a default 96 PPI resolution, and then that image size is used for effects and rendered back to the metafile, which will be rendered to screen when this slide's turn arrives. Given that e.g. my screen is 1920x1080 pixels, and the image takes almost full height, the bitmap used for the rendering is about two times shorter than needed for a reasonable quality. The question is: how can I get the target resolution at which the metafile is going to be displayed. If I get that, then it could make sense to increase the maximum bitmap size here. OTOH, I couldn't get the problem in edit mode on Windows. This codepath doesn't use VclMetafileProcessor2D, so no downsampling takes place. Could it be that kf5 uses a different rendering codepath, or maybe there's some other way to enable metafile rendering in editing mode? Thorsten, Armin: sorry to bother you, but maybe you have some ideas how to handle this? [1] https://opengrok.libreoffice.org/xref/core/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx?r=a447b5b6#2374
This issue is still reproducible in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: d52feb11c7eab0adf82c1fb410adfd3127bf9497 CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+wayland) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: CL threaded @Noel, maybe you would like to take a look at this one?