TopUsing Gimp to: Crop, Colorize and Translate
The title here just about summarizes what to do next. The postscript image
read into gimp, "File | Open" the 'print.ps'. Use a resolution of 250dpi,
Coloring set to "B/W", "Bounding Box", Aliasing "NONE", and
AnitAliasing "NONE". Don't bother the Width & Height values. Choose OK.
Your image should come in now... Rotate it to match the orientation that it had within
the eagle board editor.
Now, use the rectangle select tool (TOOLS | SELECTION | RECTANGLE) and carefully
mark out the area
just inside the board dimension line. Copy this area
of the image to a new image (FILE | NEW). This will give us an image of the board
without the dimension outline.
We need to copy what is inside the dimension boundary as the X/Y co-ords of parts are
relative to the base of board (lower left). Many times, parts will extend outside of
the board dimension line(s) and this will upset the relationship between the board image
and the actual board. Parts, in eagle, are given a location relative to the baseline,
not relative to the leftmost+bottommost component / detail.
Switch to a 1 bit palette (IMAGE | MODE | INDEXED) and save as an XPM (FILE | SAVE AS).
Next we will colorize the image. Instead of using the painting tools of
Gimp, let's take a shortcut for this. Use a text editor and edit the xpm file and
change the color field for WHITE (the spaces) from #FFFFFF to #8000FF
(you can mess with color later, for now use this one), save the file.
In gimp, re-open the xpm file, the WHITE color should now be a violet-blue.
Save this image as 'image.png' ("File | SaveAs"), the png format
is needed for the PHP script in apache.
Copy 'image.png' into that demo directory of the apache server. Give the
server a try from your browser and you should see your board as it looked
from eagle (orientation is most important).
Don't close the gimp image yet, you will probably have to make some
minor changes to it to get the floodfill color to fill the image properly.