Cutting and Pasting PIX files
Cutting and Pasting Pix Files
In cutting and pasting with pix files can be used with two programs
pixcut and pixpaste
pixcut cuts out a region in a pix file and saves it into a new pix file with that selected region only.
pixcut takes a pix file, and places that pixfile into another pixfile and outputs another pixfile with the 2 merged together.
In conjunction with each other, it is possible to copy and paste with these functions.
pixcut works by feeding the pixcut command data about the file you are cutting from, and the region you want to cut out. For example:
pixcut -s1024 -W128 -N512 -x128 -y128 cutfile.pix > tempfile.pix
This takes a 128x512 region starting at 128,128 in cutfile.pix and places it into tempfile.pix. -s1024 means the source is 1024x1024, W128 means you want to cut 128 pixels wide, -N512 means you want to cut 512 pixels tall, and -x -y mean the starting location (lower left corner) of the cutting region.
Pixpaste works nearly the same way, but instead of taking a region out of a picture, it adds to it. So for example:
pixpaste -w2048 -n1024 -W128 -N512 -x1024 -y0 otherfile.pix tempfile.pix > final.pix
This takes the tempfile.pix and places it overtop otherfile.pix at 1024,0 for the whole size of tempfile.pix, and outputs the resulting picture to final.pix. the -w2048 -n1024 are the dimensions for the file that will have the region pasted into it, -W128 -N512 is the dimension of the cut region to be pasted, and -x -y is the starting position (lower left corner) where the pasting will begin. Then otherfile.pix is the file that will be the background image, and tempfile.pix is the cut region that will be placed on top of otherfile.pix, and final.pix is the final result picture once the pixpaste is completed.