github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

mattharrison / Inkscape-Slicer-Extension

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 6
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Helper to "slice" inkscape images to pngs, by drawing boxes around what you want sliced — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

add warnings when no slice layer or no slices exist in slice layer 
matt (author)
Wed Oct 07 13:26:29 -0700 2009
commit  ee7409d9a36c377a9ba8a3fb86e26f7e65aae894
tree    f9e683a6a17ad02f4e769b58023132804b169265
parent  2316982c3a28a44b11c03afd26159193dfeb03f3
Inkscape-Slicer-Extension /
name age
history
message
file README Loading commit data...
file layer2png.inx
file layer2png.py
README
Inkscape Layer Slicer
=====================

It can be useful to "slice" images and export the slices.  This
extension facilitates that.

Here's the process I've used for slicing web layout with
Inkscape. Create your webpage layout (set page units to "px",
width/height appropriately and snap to 1 pixel intervals. This should
allow pixel perfect alignment). Then create a new layer, naming it
slices. Draw rectangles over the areas you want to slice (set
x,y,width,height to whole pixel values). Name these rectangles using
the Object Properties found in the right click contextual menu (the
saved images name will be based on that value, so name them something
like "header" instead of the default/non-useful "rect4312"). 

What the plugin then does is iterate over all of the rectangle
definitions found in the slice layer and set the opacity of the slice
rectangle to 0. (That allows you to make slightly transparent slices,
which are easier to deal with than invisible ones) It then creates
pngs for every slice. After completing the slicing, it then sets all
the slice to a different color at 25% opacity. 

  * red - overwrote a file
  * green - wrote a new file
  * grey - skipped (not overwriting)

To continue working on your design without having to deal with the
slices being selected, just "lock" the slice layer and your clicks
should fall through. You can also click the "eye" on the slice layer
to not view it.

LICENSE
=======

        GPL2

Installation
============

Put the .inx file and .py file in ~/.config/inkscape/extensions/ and restart
inkscape.

For global installation place in /usr/share/inkscape/extensions (on
gentoo, your distro may vary)

For MS place in \Inkscape\share\extensions\

Status
======

I've used this since 2007 for simple web graphics and doing
presentation images.  It was submitted to Inkscape for inclusion but
rejected because it clobbers existing exported files.

See https://bugs.launchpad.net/inkscape/+bug/169985

Note that it now includes an option to overwrite or not existing
files.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server