wish: border support for bitmap images through Fill and Stroke panel

Bug #241081 reported by VladBlanton
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Wishlist
Unassigned

Bug Description

It would be wonderful if inkscape supported some image manipulation of bitmap's. Namely, support for adding vector borders to bitmap images through the 'Fill and Stroke' panel just like any other object. This probably isn't hard to implement for x-sided images (rectangle, square, etc) but would be more complicated yet incredibly useful for images that have arbitrary dimensions.

If this is only possible atm for simple images (squares, rectangles, triangles, etc) than an implementation just for that would still be great.

Tags: bitmap styles
Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

That'd be great indeed, but what do the SVG specs specify? If this isn't supported by SVG, then it will never be supported by Inkscape.

Revision history for this message
nightrow (jb-benoit) wrote :

Can someone look at this so we can get fixed ?

Changed in inkscape:
importance: Undecided → Wishlist
Revision history for this message
VladBlanton (vblanton) wrote :

So, looking at the 1.1 SVG Full specs, 'stroke' goes around a 'shape'. A shape is not a bitmap, but "A graphics element that is defined by some combination of straight lines and curves. Specifically: 'path', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon'." But, theoretically, inkscape could calculate the boundries of a bitmap and then create a shape that goes around it .. and stroke it.

In the upcoming 1.2 SVG Full specs, there are two things that seem relevant:
9.3 The veStrokePath element
(http://www.w3.org/TR/2004/WD-SVG12-20041027/vectoreffects.html#veStrokePath-element)
and
9.12 The veStroke element
(http://www.w3.org/TR/2004/WD-SVG12-20041027/vectoreffects.html#veStroke-element)

If i understand correctly, "veStroke" (aka, vector stroke) creates an arbitrary shape which can have opacity set to 0. this shape can then have a separate stroke applied to it.

Anyway, this implementation wouldn't break SVG specs. Implementation could follow specs in the sense that in the end it creates an object that follows svg specs. The original bitmap image doesn't need to be linked to it, just used for the original calculations in creating a path.

So, its up to you devs to decide whether or not this is worth doing, whether or not this is a way to liberal use of SVG specs, and whether this is a maintainable feature.

best,
Vlad

jazzynico (jazzynico)
tags: added: bitmap styles
Changed in inkscape:
status: New → Triaged
Revision history for this message
sdaau (sd-imi) wrote :

Hi all,

I just managed to make an Inkscape extension that takes a selected image, creates a rectangle, and a rectangle clone which is used as a clipping path, and groups everything, please check here:

http://sdaaubckp.svn.sourceforge.net/viewvc/sdaaubckp/extensions/inkscape/borderframeimage.inx
http://sdaaubckp.svn.sourceforge.net/viewvc/sdaaubckp/extensions/inkscape/borderframeimage.py

Not really up to SVG specs I guess - basically, I went along the recommendations in:

 http://thepinksylphide.com/2008/11/22/inkscape-web-comic-tutorial-bordering-an-image
 [solved]Image into rounded frame - http://www.inkscapeforum.com/viewtopic.php?f=5&t=1738

... but it could be, it is a possible workaround - until a real solution arrives....

Cheers!

Revision history for this message
VladBlanton (vblanton) wrote :

Wonderful! Thanks for working on this. I saw your post right away, but have been waiting to give it a spin before replying. I haven't had a chance yet, however, but I just wanted to express my appreciation in the mean time!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.