Thursday, May 12, 2016
How to take an image of a grid from a PDF and convert it into a bitmap using free software
I recently intalled the SuperbaKnit interface on my Superba S-48. The SuperbaKnit software can work with bitmap files. I've figured out how to take an image of a grid with a pattern in it and convert it into a bitmap file.
I am working in Windows XP, using Adobe Reader XI and GIMP 2.8.16
Here is a step by step guide:
1. Download and install the free software.
Adobe Acrobat Reader from www.adobe.com
GIMP from gimp.org
2. Open the PDF in Adobe Reader. Find the grid in the PDF that you want to copy.
3. From the menu, choose Edit > Take a SnapShot
4. Using your mouse, draw a rectangle around the grid you want. When you let the mouse button go, a snapshot of the selected region is copied into the clipboard.
5. Open GIMP. From the menu, choose File > Create > From Clipboard
6. You should have a new file open with the selected area from the PDF in it.
7. CROP the image so that only the grid is visible.
From the menu, choose Tools > Transform Tools > Crop
Place your mouse at one corner of the grid, click and drag to select the entire grid. Let go. You can adjust the crop lines by moving to the centre of any of the lines and dragging.
When you are satisfied with the region you have selected to crop, hit ENTER, and the image will be cropped.
** Sometimes the original image needs to be rotated so that it is square on the page. From the menu, choose Layers > Transform > Arbitrary Rotation
I find that usually my rotations have been between 0.1 and 0.5 degrees, but play around until you have the grid as close to vertical as you can manage.
You probably need to crop again after you have rotated.
8. Now set the Mode of the image to be black and white.
From the menu, choose Image > Mode > Indexed and choose "use black-and-white palette (1 bit)"
Click Convert.
Now your image is a bitmap, with each pixel either white or black
9. Finally, scale your image so that there is one pixel per grid cell.
From the menu, choose Image > Scale Image
Type in the grid dimension in width, and when you move out of that cell, height will be set. Check that the height matches the number of cells in your grid.
I have found that sometimes I get the right numbers if I set height.
If you still don't have the right size, go back and crop the image a bit more.
10. Now that you have a bitmap that corresponds to the grid, you need to save it.
From the menu, choose File > Export
At the top of the screen, you can set the Folder where the image will be placed, and the name of the file.
At the bottom left, there is a plus sign next to "Select File Type". Click the +, and scroll down to Windows BMP image. Click the Export button.
Now you have a bitmap that corresponds to the grid image in your pdf file.
I hope these instructions help.
Labels:
Adobe Acrobat Reader,
bitmap,
CAMK,
free software,
GIMP,
grid,
image processing,
machine knitting,
Superba,
SuperbaKnit
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment