after creating a lot of photo images i get following error message:
"Fail to create pixmap with Tk_GetPixmap in ImgPhotoInstanceSetSize"
i found this error message in the file:
tkImgPhoto.c (ImgPhotoInstanceSetSize(instancePtr))
and as far as i understand, it somehow seems that CreateBitmap
(invoked by the Tk_GetPixmap in tkWinPixmap.c) fails, which means that
i am running out of bitmap handles?
any work arround available? any bug fixes? any help?
it's a major problem for me at the moment.. so i am happy for any kind
of hints!
jessi
George
"Jessi" <jess...@yahoo.de> wrote in message
news:1d944ba3.04012...@posting.google.com...
thx george for replying...
i forgot to tell, that i am also using the "image create compound"
command from tix.
so:
"Georgios Petasis" <pet...@iit.demokritos.gr> wrote in message news:<bv92fs$g8j$1...@ulysses.noc.ntua.gr>...
> What is their width/height (just to get an idea of the required memory).
the size is different (eg. 64 x 64, 130 x 30 or even 153 x 113)
but for example: size 153 x 113, number of compound images allocated:
about 900 and it crashes with "Fail to create pixmap with Tk_GetPixmap
in ImgPhotoInstanceSetSize"
compound images: icon + name of the file put underneath
> Do you need all of these images loaded at once?
yes, because it can happen, that there are e.g. 1200 files in one
folder, and we show the files as icons..
> Perhaps you have run out memory? (Windows will never allow an app
> to take more than 600MB :-))
>
i wrote a little test program:
set frame [frame .frame]
set width 200
set height 200
for { set i 0 } { $i < 7000 } { incr i } {
image create photo $i -width $width -height $height
set tmp [image create compound COMP_$i -window $frame]
$tmp add image -image $i
$tmp add line -anchor center
$tmp add text -text $i
update idletasks
puts "i $i"
}
result:
789 images and compound images were created ==> then crash with this
error
but trying:
set width 200
set height 200
for { set i 0 } { $i < 7000 } { incr i } {
image create photo $i -width $width -height $height
image create photo test_$i -width $width -height [expr $height + 10]
update idletasks
puts "i $i"
}
result:
2269 images were created => crash with "not enough memory in image
buffer" ==> but with that result i can live!
so it seems to be a problem in the "image create compound" command?
using:
tix8.1.4
itcl3.2
tcl8.4.2
tk8.4.2
anyone out there who has experience with that? or a solution?
if not, then i will have to chuck out the "image create compound", and
create the icon with the filename underneath on my own..
that will maybe do it..
jessi
George
"Jessi" <jess...@yahoo.de> wrote in message
news:1d944ba3.04012...@posting.google.com...