Originally Posted by
Chris M
Is there a way to convert a picture to a shape?
Chris, bear with me on this one.
If you create a Rectangle the same dimensions as you image and then Fill it with the image, you get a Photo.
If you change the Bitmap Fill from single Tile to Repeating tile, you get a Rectangle.
You can SVG this. I chose 300dpi; Clip path (Adobe); selected object.
The resultant code block (less the bitmap) is:
Code:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!--Generator: Xara Designer (www.xara.com), SVG filter version: 6.3.0.31-->
<svg fill="none" fill-rule="evenodd" stroke="black" stroke-width="0.501" stroke-linejoin="bevel" stroke-miterlimit="10" font-family="Times New Roman" font-size="16" style="font-variant-ligatures:none" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" overflow="visible" width="191.999pt" height="191.999pt" viewBox="139.697 -585.552 191.999 191.999">
<defs>
<image id="Bitmap" preserveAspectRatio="none" width="1" height="1" xlink:href="data:image/png;base64, ...=">
<title>1</title>
</image>
</defs>
<g id="Page background" transform="scale(1 -1)"/>
<g id="MouseOff" transform="scale(1 -1)">
<clipPath id="clip-path">
<use xlink:href="#Shape"/>
</clipPath>
<g clip-path="url(#clip-path)">
<use xlink:href="#Bitmap" transform="translate(139.697 585.552) scale(191.999 -191.999)"/>
</g>
<rect x="-96" y="-96" width="192" height="192" transform="translate(235.697 489.553) rotate(90)" stroke-linecap="round" stroke="none" stroke-width="0.75" stroke-linejoin="miter" fill="none" id="Shape"/>
</g>
</svg>
An Inkscape Pattern is more flexible if you are going to include more shapes and gradients.
Either one, necessarily uses, IDs. Again, useful for CSS and other manipulations, especially animations.
The power of either will come when Xara natively handles SVG Imports as SVGs.
When I Import either back in, I get:
- Adobe:
- Rectangle, Named Shape
- Clipped Shape:
- Photo "Bitmap" (782 dpi), Named Bitmap, 98.2px2
- Unnamed Rectangle
- Inkscape:
- Clipped group:
- 4 copies of:
- Photo "Bitmap" (782 dpi), Named Bitmap, 98.2px2
- Three "copies" are empty
- Area of all four occupies 609.7px2
- Unnamed Rectangle
The <Many> you were getting was the combined selection of the two Shapes within the (Adobe) Clipped shape.
Sadly, Xara, again, fails to validate its SVG Impex.
Acorn
Bookmarks