Project

General

Profile

Actions

Bug #13367

open

Correct image rendering fallback

Added by Matthias Van Ceulebroeck 20 days ago. Updated 8 days ago.

Status:
InProgress
Priority:
High
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.

Actions #1

Updated by Romain Mardulyn 8 days ago

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

Also available in: Atom PDF