Project

General

Profile

Actions

Feature #38504

closed

Display pasted images in appropriate size on HiDPI displays

Added by Go MAEDA over 1 year ago. Updated 21 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

The attached patch improves the image paste feature to display images in appropriate size when you use HiDPI displays like Mac's Retina Display.

If you capture a screenshot on a HiDPI display and paste it into Redmine, the image will be displayed at twice the expected size. The image below is an example. Although the expected display size of the image is 400 x 240px, it is actually displayed at 800 x 480px. This is because the image was captured on a HiDPI display and its physical size is 800 x 480px. For me, this problem is really annoying.

After applying the patch, Redmine recognizes the pixel density of the current display when pasting an image and adds an "@2x" or "@3x" suffix to the filename (e.g. clipboard-****@2x.png) depending on the recognized value of the pixel density. With the suffix, pasted images are displayed in an appropriate size. Note that Redmine 3.4.0 and later can recognize suffixes such as "@2x" and "@3x" and adjust the display size of the image (#24922).

I believe this change will improve the UX when using HiDPI displays by resolving the problem that images are displayed at more than twice the size.

Before:
The image in a forum post is displayed twice as large as expected.

After:
The image is displayed at the expected size due to the addition of the "@2x" suffix to the filename when pasting.


Files

Actions

Also available in: Atom PDF