Basically I want a function that is like

SavePicture <picture>,<saveasfilename>

only it saves as a jpg (with compression) instead of a .bmp.

If this function could take the same input as the SavePicture function does (<picture> in above code, but I don't actually know what type that is) then it would be perfect! I found an ocx that converts all types around, so I can use a SavePicture <picture>,<filename>, then I can convert the filename.bmp to filename.jpg and it has selectable compression and such, but I would rather not have to save as a .bmp, convert to .jpg, and then delete the .bmp (somehow?). If there is no easier way to do this, then can someone please tell me how to delete the original .bmp without it going to the recycle bin or anything, just basically incinerating the file?

I have tried to work with the ijl11.dll (Intel JPEG Library) without success. Any suggestions?