How to pixel-perfect slice a JPG for a website?

Post questions on how to use or achieve an effect in Inkscape.
kurtosis
Posts: 2
Joined: Sun Dec 08, 2013 9:31 am

How to pixel-perfect slice a JPG for a website?

Postby kurtosis » Sun Dec 08, 2013 9:51 am

Hi all, programmer here getting into graphic design for the web for the first time.

I'm helping a friend with a website, and we have a JPG mockup of that website that consists of photos, graphics, text, and layout. Simple shapes only - squares, rectangles, and circles, but a pixel-perfect and actual size/dimension mockup of the final site.

I need to slice the photos and graphics out of this JPG for use in the HTML, but it's not clear to me how to do this in a pixel-perfect way. All the Inkscape demo's and tutorials I've found show manually tracing the outline of the objects to slice, but with very simple shaps is there a way to get the selection tool to snap-to the shape outline? Or something similar?

PS - If I'm not asking the right question, please feel free to correct me. All advice appreciated.

Thanks!

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How to pixel-perfect slice a JPG for a website?

Postby Lazur » Tue Dec 10, 2013 10:29 pm

Hi.

For such work you may better use a raster editor program like gimp.

If you want to do that in inkscape, then set up a grid in the document's properties panel (Shift+Ctr+D),
if you want to use the pen tool, set it to draw only horizontal-vertical lines at the tool options.

kurtosis
Posts: 2
Joined: Sun Dec 08, 2013 9:31 am

Re: How to pixel-perfect slice a JPG for a website?

Postby kurtosis » Wed Dec 11, 2013 8:00 am

Thanks, only have the Adobe Illustrator file to work with, so will give that a shot in Inkscape.

Uktrunie
Posts: 154
Joined: Sun Jul 18, 2010 4:48 am

Re: How to pixel-perfect slice a JPG for a website?

Postby Uktrunie » Mon Dec 16, 2013 1:12 pm

A little late, but you might also want to take a look at heathenx's video #16 at http://screencasters.heathenx.org/episode-016/.

Hope it helps.

User avatar
heathenx
Posts: 388
Joined: Thu Jun 07, 2007 11:51 pm
Location: USA
Contact:

Re: How to pixel-perfect slice a JPG for a website?

Postby heathenx » Mon Dec 16, 2013 11:32 pm

The OP might be looking for something a bit more advanced than what I showed in that video. Inkscape has a great web page slicer extension (when it worked). This is the kind of stuff I wish the devs would either remove or get working across all platforms again. Perhaps it will be fixed in v.0.49. The extension wasn't perfect but it was quite handy to have inside Inkscape. I think I would go with Lazur URH's suggestion and slice it up with Gimp. At least that will write the html for you. You may be able to open the Adobe Illustrator file straight up in Gimp else open it in Inkscape and rip it out as a PNG. I'm not sure things will be pixel perfect for you but where there is a will there is a way, I suppose.


Return to “Help with using Inkscape”