Stroking imported bitmaps
Can't quite sort this out. I'd like to import (or open) a bitmap -- say, a rectangular jpg photo -- add a stroke, round the corners, etc.
It's pretty clear right away that the imported bitmap won't accept a stroke. I haven't found a way to make Inkscape think of it as an object. It seems to be permanently an "image".
The next thought I had was to draw the "frame" I wanted (rounded rectangle) on another layer, convert to path, select the rectangle and bitmap together, and Join. No go. The bitmap is still not an 'object'.
So far I wasn't surprised. While I'm not visualizing it completely, I know that vector-based tools are reluctant to embrace bitmaps. There's a negotiation layer full of assumptions, and most just stay away.
Most recently I tried to fill my rectangle frame with an object-to-pattern made from the jpg. This came very close, but the fill made arbitrary tiling assumptions and refused to start at 0,0.
I'm sure I'm over-thinking this. But it would be a boon to use the same, consistently stroked frame for stuff I compose in Inkscape *and* the occasional photo.
Any ideas? What am I missing?
LQ
On Sat, 19 Mar 2005 20:43:16 -0500, Lou Quillio <public@...534...> wrote:
It's pretty clear right away that the imported bitmap won't accept a stroke. I haven't found a way to make Inkscape think of it as an object. It seems to be permanently an "image".
Indees images cannot have stroke in SVG.
One way is to select the image and press Alt+I. Now it's a rectangle with bitmap pattern fill. Looks the same but behaves more like a normal object. You can even set the preference to always import bitmaps as rects with pattern fill.
The next thought I had was to draw the "frame" I wanted (rounded rectangle) on another layer, convert to path, select the rectangle and bitmap together, and Join. No go. The bitmap is still not an 'object'.
Why join? Just remove the fill from the rect and overlay it so that bitmaps is visible inside.
Most recently I tried to fill my rectangle frame with an object-to-pattern made from the jpg. This came very close, but the fill made arbitrary tiling assumptions and refused to start at 0,0.
What are the "arbitrary assumptions"? Please be more specific. You can move a pattern fill wherever you need it using the pattern handles.
bulia byak wrote:
One way is to select the image and press Alt+I. Now it's a rectangle with bitmap pattern fill. Looks the same but behaves more like a normal object.
Perfect. That's it. Order of operations.
Why join? Just remove the fill from the rect and overlay it so that bitmaps is visible inside.
That's what I'd have tried next. Also a good solution.
What are the "arbitrary assumptions"? Please be more specific. You can move a pattern fill wherever you need it using the pattern handles.
I wasn't grokking pattern handles, but I now see that a pattern fill stays fixed when the object is re-sized, so I can frame the pattern that way.
But pattern handles and gradient handles ... how are these specifically accessed?
As far as arbitrary tiling, I mean this:
1. Import a 200x200px bitmap. 2. Object to pattern. 3. Make a 200x200px rectangle. 4. Use the pattern as fill. 5. Intuitively, the fill would begin at 0,0 of the rectangle starting with 0,0 of the pattern. Instead, the fill tiles with 0,0 of the pattern at a seemingly arbitrary point in the rectangle's interior. The tiling's right, but it seems to have decided on its own where to start.
Thanks *very much* for the extremely fast response and excellent clarification. Much more than I hoped for.
LQ
On Sat, 19 Mar 2005 21:23:07 -0500, Lou Quillio <public@...534...> wrote:
I wasn't grokking pattern handles, but I now see that a pattern fill stays fixed when the object is re-sized, so I can frame the pattern that way.
Not always. There's a switch (rightmost toggle button on the selector controls bar) which controls this. You can transform objects with or without its pattern fill, depending on this switch. However this only affects transforms with selector; when you change the shape by its own shape handles (e.g for the rect they are in the corners) the fill remains fixed.
But pattern handles and gradient handles ... how are these specifically accessed?
E.g. in the node tool. There are the move handle (cross in top left corner), scale (square, middle of diagonal) and rotate (circle, middle of top side). The gradient handles are accessible also in Node tool and in the new Gradient tool.
As far as arbitrary tiling, I mean this:
- Import a 200x200px bitmap.
- Object to pattern.
- Make a 200x200px rectangle.
- Use the pattern as fill.
- Intuitively, the fill would begin at 0,0 of the rectangle starting with 0,0 of the pattern. Instead, the fill tiles with 0,0 of the pattern at a seemingly arbitrary point in the rectangle's interior. The tiling's right, but it seems to have decided on its own where to start.
It's not arbitrary. It's exactly the same origin point which it had in the previous object from which you are reusing the pattern (either by assigning pattern fill via Fill&Stroke dialog, or by Copy/Paste style). This makes a lot of sense because if you assign the same pattern to many objects, all their fills will align to each other displaying a common grid. But of course after that you can move any object's fill using its handles to wherever you need it.
By the way in this example you don't need a second rect at all. After 2, you already have a rectangle with pattern fill. Do what you want with it (fill, stroke, crop, etc).
Excellent. Very clear. Between this clarification and the inkscape-shadow.sh script, I barely need GIMP. Mastering images in SVG rocks.
LQ
bulia byak wrote:
On Sat, 19 Mar 2005 21:23:07 -0500, Lou Quillio <public@...534...> wrote:
I wasn't grokking pattern handles, but I now see that a pattern fill stays fixed when the object is re-sized, so I can frame the pattern that way.
Not always. There's a switch (rightmost toggle button on the selector controls bar) which controls this. You can transform objects with or without its pattern fill, depending on this switch. However this only affects transforms with selector; when you change the shape by its own shape handles (e.g for the rect they are in the corners) the fill remains fixed.
But pattern handles and gradient handles ... how are these specifically accessed?
E.g. in the node tool. There are the move handle (cross in top left corner), scale (square, middle of diagonal) and rotate (circle, middle of top side). The gradient handles are accessible also in Node tool and in the new Gradient tool.
As far as arbitrary tiling, I mean this:
- Import a 200x200px bitmap.
- Object to pattern.
- Make a 200x200px rectangle.
- Use the pattern as fill.
- Intuitively, the fill would begin at 0,0 of the rectangle starting with 0,0 of the pattern. Instead, the fill tiles with 0,0 of the pattern at a seemingly arbitrary point in the rectangle's interior. The tiling's right, but it seems to have decided on its own where to start.
It's not arbitrary. It's exactly the same origin point which it had in the previous object from which you are reusing the pattern (either by assigning pattern fill via Fill&Stroke dialog, or by Copy/Paste style). This makes a lot of sense because if you assign the same pattern to many objects, all their fills will align to each other displaying a common grid. But of course after that you can move any object's fill using its handles to wherever you need it.
By the way in this example you don't need a second rect at all. After 2, you already have a rectangle with pattern fill. Do what you want with it (fill, stroke, crop, etc).
SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
participants (2)
-
bulia byak
-
Lou Quillio