Hi
The dimension should be given in EMU. You can covert pixel value into EMU and set the value. For refernce 1 pixel = 9525 EMU. I am giving an example in c#.
int
widthInEMUs = Width * 9525;
int
heightInEMUs = Height * 9525;
And the xml like
<w:drawing>
<wp:inline>
<wp:extent cx=\"{WIDTH-IN-EMUS}\" cy=\"{HEIGHT-IN-EMUS}\" /> .......
Thanks
Prosanta