As far as your original post, well to understand the problem you needed to give more info. When you said you had a 400K image, it's not very helpful. Is this the compressed size? The size of a raw 24 bit image or an 8 bit palette indexed image? If you detailed the raw size (X,Y) of the image, the color depth (assuming 24-bit but...) and an idea of what the image was (photo, or computer generated such as text for nav buttons or other image with long runs of continuous color) it would help point out what might work best or even if 40K was a reasonable target.
Having said that,
steves approach should work. Though it would help if you described what it was type of image content it contained and what the dimensions are.
-Lee
"To be civilized is to deny one's nature."