computeBBox function doesn't support images

Bug #813366 reported by Giacomo Mirabassi on 2011-07-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Giacomo Mirabassi

Bug Description

I'm trying to write an extension that uses the computeBBox function present in Into the code is stated that the function doesn't support text, but it doesn't support images too.

to have images working it seems to be enoguh to change line 156 from

elif node.tag in [ inkex.addNS('rect','svg'), 'rect' ]:


elif node.tag in [ inkex.addNS('rect','svg'), 'rect' ] \
                            inkex.addNS('image','svg'), 'image' ]:

su_v (suv-lp) on 2011-07-20
tags: added: extensions-plugins
Alvin Penner (apenner) wrote :

confirmed on Inkscape rev 10450

Changed in inkscape:
status: New → Confirmed
Alvin Penner (apenner) wrote :

- good catch, Giacomo, nice elegant solution! I've applied your change to the file, and attach it here just for testing purposes.
- The effect of the patch can be seen on Inkscape 0.48.1 by using Extensions->Visualize Path->Dimensions on a bitmap. This would previously have failed.
- The effect can also be seen on recent Inkscape trunk if you use Dimensions and specify the Geometric option. This option uses the computeBBox function.

Alvin Penner (apenner) wrote :

committed to rev 10492

Changed in inkscape:
status: Confirmed → Fix Committed
jazzynico (jazzynico) on 2011-07-23
Changed in inkscape:
assignee: nobody → Giacomo Mirabassi (giacmir)
milestone: none → 0.49
Bryce Harrington (bryce) on 2015-02-21
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers