Batch convert to 16 bits

Hello,

I have a set of fits file which are all 32 bits, but I need to convert them to 16 bits to use them in a different program that only handles 16 bits fits…

I tried creating a script along the lines of:

requires 1.0.0
LOAD r_1993UB-001.fits
SET16BITS
SAVE 16_r_1993UB-001.fits
CLOSE
… continue with all my images…

But it did not work, the images are created, BUT they are 32 bits, not 16…

What is the proper way to do a batch 32 to 16 bit convertion?

Thanks,
Cyrille

Interesting, if that doesn’t work maybe there’s no automated way to do it. I guess the fact that’s a 32 bit image makes it save it as 32 bit, only the switch in the GUI could force it then…