Saving a large TJpeg - Insufficient Resources?



Hi, been a long time since I Delpi'd - hope you guys can help.

I'm writing a little program to suck in a jpg photograph, add some text to
it (date, filename etc) and save it back out again.

I'm loading the file into a TJpegImage, creating a Tbitmap and using
stretchdraw to copy the data to the bitmap - then using the bitmap.canvas to
write my text, then finally using jpeg.assign to get back into jpeg format
before using jpg.savetofile

but... with the larger images (3000x2000 pixels) I'm getting an exception
telling me there are insufficient resources. If it can load the jpeg to
start with, how can this be??

Any help is very gratefully received!

Thanks,

Roy.


.