Skip to content

I20250405-1800

@HeikoKlare HeikoKlare tagged this 05 Apr 11:18
The ImageLoader and FileFormat implementations currently combine the
check whether an image can be provided at a specific scale value and the
provision of an image in the scale itself. In case a consumer wants to
only test whether an image can be provided at a specific scale, it needs
to request that image at that scale, even if it will not be used later
one, e.g., because it cannot be provided in the required scale.

With this change, ImageLoader and FileFormat provide separate methods
for validating whether an image can be retrieved at a specific zoom
(such as from an SVG) and the retrieval of the image itself. This is
employed by the Cocoa Image implementation to avoid unnecessary load
operations and in the Win32 Image implementation to correct erroneous
scaling from an already initialized handle instead of loading at proper
zoom (such as for an SVG). In addition, this fixes a faulty reuse of the
same stream in the Cocoa Image implementation at the same place.
Assets 2
Loading