This forum is archived, go to the new forum!

This is the old fritzing discussion forum. Search it for valuable information from 2009 to 2015.

Selection size and alignment for PNG

potrzebie 8 years, 11 months ago

Almost finished with my first part! I opened the generic 14-pin IC SVG image in Inkscape, exported it to PNG and edited in a drawing program (unfortunately, I don't have the time to learn vector graphics and Inkscape).

 

4093

 

 The only, tiny problem is that the selection box (the actual part size) become much larger than my image size. (see http://www.troligen.se/fritzing/schematic.gif) and it's legs are a little misaligned in height to other ICs. Can I solve this in some simple way? Maybe I can export this part then and upload to fritzing.org?

Jonathan Cohen 8 years, 11 months ago

Hi Potrzebie,

Assuming that you used the parts editor to import the png into the schematic image, it looks like a bug.  But there might be an easy fix.  First you need to know the size of the png image (in pixels).  Now open up the schematic view image (the svg for the part) in Inkscape.  Under the File menu choose Document Properties.  In the dialog box that comes up, on the Page tab, there is a "Custom Size" box.  Set the units to "px" and put the actual size of the png image in there.  This will change the size of the whole svg to be the same size as the image.  Note that after you close the dialog box, you many need to select the image and reset its x and y coordinates back to zero so that it aligns to the top left of the whole svg.

If you get stuck somewhere or this doesn't work, then export your part and email it to info (at) fritzing (dot) org.  Also attach the png file.  

Cheers.

- j

 

 

 

PS.  Do you know Alfred E. Neuman?

Jonathan Cohen 8 years, 11 months ago

PPS.  Looks like the bug will be fixed in the next release.

potrzebie 8 years, 11 months ago

It worked :) Many thanks.

 

What, me worry?