Project

General

Profile

Actions

Bug #13367

closed

Correct image rendering fallback

Added by Matthias Van Ceulebroeck 10 months ago. Updated 3 days ago.

Status:
Closed
Priority:
High
Target version:
Start date:
01/02/2025
Due date:
% Done:

100%

Estimated time:

Description

Consider the case where an image is rendered:

WPainter painter(device);
WPainter::Image image(path, width, height);
painter.drawImage(0.0, 0.0, image);

This can do one of two things depending on the environment.

  1. JS is available. Then the image is drawn on the client's side using WPaintedWidget's features.
  2. JS is not available. The image is then loaded on the server and the blob data is pushed to the client.

However, the issue arises from the path variable. This variable can be interpreted in two ways. In the first case, one expects a path relative to the docroot. The image is loaded statically by the browser.
In the second case, this would need to be a path that the application can work with. If the path is not known to the application, this will result in different behaviour. This is the case if the docroot != application working directory. This is often the case.

This means the automatic fallback for images does NOT function in case that --docroot . is not specified.

The proposed solution (under consideration) is to add a class that can map exposed files/resources to files on the filesystem of the server, linking them together. That way each implementation knows what path to choose.


Related issues 1 (0 open1 closed)

Related to Bug #13366: Correct image url for widget gallery botsClosedMatthias Van Ceulebroeck01/02/2025

Actions
Actions #1

Updated by Romain Mardulyn 9 months ago

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn
Actions #2

Updated by Romain Mardulyn 9 months ago

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)
Actions #3

Updated by Matthias Van Ceulebroeck 3 months ago

  • Target version changed from 4.12.0 to 4.12.1
Actions #4

Updated by Matthias Van Ceulebroeck 3 months ago

  • Related to Bug #13366: Correct image url for widget gallery bots added
Actions #5

Updated by Matthias Van Ceulebroeck 24 days ago

  • Status changed from Review to Implemented @Emweb
  • Assignee set to Romain Mardulyn
  • % Done changed from 0 to 100
Actions #6

Updated by Matthias Van Ceulebroeck 13 days ago

  • Status changed from Implemented @Emweb to Implemented @Test
Actions #7

Updated by Matthias Van Ceulebroeck 3 days ago

  • Status changed from Implemented @Test to Closed
Actions

Also available in: Atom PDF