Resizing to 768x576 is done as a way for you to get the true aspect ratio of what you're capturing. It's not the final size.
Typically, after following my instructions above, you're left with a 768x576 frame with a square PAR. You then crop out the black borders and, assuming all went well, you're left with the proper display aspect ratio (DAR). You use this DAR to make sure that your final size accurately reflects the proportions what you captured.
Example: Transforming PAL GOUT to an Anamorphic NTSC DVD:
1. Crop 8 pixels from the left and right, leaving you with 704x576.
2. Resize to 768x576 for a square PAR.
3. Crop 124 pixels from the top and 126 pixels from the bottom to get rid of the black borders. This leaves you with 768x326.
4. Notice that 768/326 = ~2.35. This is the DAR that we want to maintain.
5. NTSC DVD is 720x480, but when anamorphically stretched on a widescreen TV, the size is ~854x480 (16:9), so we need to solve for X in the following equation: 854/X = ~2.35 (our DAR). The answer is 362. (Please use a calculator for this and don't round!)
6. We can now use 720x362 as our final image size. When anamorphically stretched on a widescreen TV, this will result in 854x362 which is close to our DAR (2.359 vs. 2.355).
7. Now we add in black borders (59 on the top and bottom) to get the height to be 480.
Notice that most of these steps are used to determine the correct final size. You don't (and shouldn't) put them all separately in the script. For this particular example, all you need to do is the following:
gout.Spline36Resize(720, 362, 8, 124, 704, 326).AddBorders(0, 59, 0, 59)
This will look vertically stretched on your 4:3 TV, but will look 100% correct on your 16:9 TV.