Project

General

Profile

Actions

Bug #13367

open

Correct image rendering fallback

Added by Matthias Van Ceulebroeck 7 months ago. Updated 19 days ago.

Status:
Review
Priority:
High
Assignee:
-
Target version:
Start date:
01/02/2025
Due date:
% Done:

0%

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 7 months ago

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

Updated by Romain Mardulyn 7 months ago

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

Updated by Matthias Van Ceulebroeck 19 days ago

  • Target version changed from 4.12.0 to 4.12.1
Actions #4

Updated by Matthias Van Ceulebroeck 14 days ago

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

Also available in: Atom PDF