ImgPhotoInstanceSetSize



ImgPhotoInstanceSetSize() is a static function in tkImgPhoto.c which
sadly enough calls Tcl_Panic() in some circumstances.
Unfortunatly we reach this point on machines that reach some upper
limit of resources. Which resource precisely I could not find out yet.

I tried to fix the problem in tkImgPhoto.c, but allthough
ImgPhotoInstanceSetSize is static I wasn't confident that my
modifications are completely sound.
But for someone who knows what's going on in the few functions that
use ImgPhotoInstanceSetSize it shouldn't be diffcult to come up with a
solution that is friendlier than Tcl_Panic in at least some of the
cases. --
Tcl_Panic entails abort(), which is not acceptable when the only
problem is not being able to show an image.
I would rather have an ugly image and/or an bgerror than a crashed
application!
(Our application is doing socket communication and that could continue
fine, even if some of my images are not displayed correctly)

IMHO ImgPhotoInstanceSetSize() should just return TCL_ERROR and the
calling functions should, at least sometimes, do something friendlier
than Tcl_Panic.

thanks in advance,
Florian
.