Integrated: 8342530: Specifying "@Nx" scaling level in ImageStorage should only load that specific level

Lukasz Kostyra lkostyra at openjdk.org
Mon May 19 14:27:56 UTC 2025


On Thu, 15 May 2025 11:27:21 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:

> This follow-up change finishes the earlier changes to `ImageStorage.loadAll()` and adds support for loading specific scale requested in the input.
> 
> `loadAll()` will now first check if the input path ends with a scaling level specified, and if that is the case it will attempt creating a Stream. If requested resource does not exist it will throw an Exception, skipping the rest of the load process. If the resource does _not_ have a scaled name in its path, it will continue loading as normal - looking for all scale levels, trying to load the main resource and falling back to trying to load "@1x" variant.
> 
> Added tests to check the new `ImageTools.hasScaledName()` method + new behavior.

This pull request has now been integrated.

Changeset: 3299949c
Author:    Lukasz Kostyra <lkostyra at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/3299949c2f8921432fc25bf125bae37f149d032d
Stats:     63 lines in 4 files changed: 55 ins; 0 del; 8 mod

8342530: Specifying "@Nx" scaling level in ImageStorage should only load that specific level

Reviewed-by: mstrauss, jhendrikx

-------------

PR: https://git.openjdk.org/jfx/pull/1809


More information about the openjfx-dev mailing list