GNU bug report logs -
#44065
28.0.50; SVG image not shown completely
Previous Next
Reported by: styang <at> fastmail.com
Date: Sun, 18 Oct 2020 15:08:02 UTC
Severity: normal
Found in version 28.0.50
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
Message #106 received at submit <at> debbugs.gnu.org (full text, mbox):
On Sat 24 Oct 2020, Eli Zaretskii wrote:
>> Date: Sat, 24 Oct 2020 18:01:24 +0100
>> From: Alan Third <alan <at> idiocy.org>
>> Cc: Andy Moreton <andrewjmoreton <at> gmail.com>, 44065 <at> debbugs.gnu.org
>>
>> On Sat, Oct 24, 2020 at 10:09:59AM +0300, Eli Zaretskii wrote:
>> >
>> > (We cannot just call a new function from an image library without
>> > loading it from its DLL at run time on MS-Windows.)
>>
>> Ah, that's not something I was aware of. Thanks for fixing it.
>
> No sweat. And thanks for fixing the original problem to begin with.
A new report in bug#44206 shows that this patch caused other problems.
The docs for rsvg_handle_get_geometry_for_layer show it does not report
minimum sizes, as it ignores clipping regions. Thus for an SVG file
which contains a small clipping region applied to a larger image, the
reported sizes are incorrect.
Also, rsvg_handle_get_geometry_for_layer returns a gboolean, which the
docs do not describe, but other API functions return TRUE for success
and FALSE for failure. This should be checked.
Running under gdb with the image from bug#44206 shows that the bounds
reported by rsvg_handle_get_geometry_for_layer are zero (so the
functions may have failed and returned FALSE).
The original report here showed that rsvg_handle_get_dimensions did not
alwyas return the correct results. It is documented to require a prior
call to rsvg_handle_set_dpi to give correct results, but that is not
called in image.c.
Perhaps this can be fixed by reverting to the original code with
addition of a call to rsvg_handle_set_dpi or rsvg_handle_set_dpi_x_y
before calling rsvg_handle_get_dimensions.
AndyM
This bug report was last modified 4 years and 269 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.