Mantis - Croquet
Viewing Issue Advanced Details
3759 Hedgehog tweak always 06-01-06 22:27 12-04-06 21:51
howardstearns  
howardstearns  
normal  
resolved  
fixed  
none    
none  
0003759: Full texture sometimes goes into island
There are several ways to create TTextures. The one used by CroquetHarness>>dropForm: puts the whole high-res TForm into the island. (bthumb is false.) As a result, islands with stuff added this way become bloated and take longer to sync.
The atttached changeset fixes this by refactoring TFormManager>>addFileNamed:mipmap:shrinkFit:extention:, and then using the new code in #dropForm:.

However, there are two things to be aware of:

   1. The TFormManager caches real image files (.jpeg, .gif, .bmp, etc.). It doesn't cache Squeak-native Form bits, presumably because we want to be able to tell what's what by using the operating system preview functionality when clicking on a file in the cache.

#dropForm: is given a high-res form, not the original file, so all we can do at that point is guess at what format to write out to the cache. For now, I've just guessed at JPEG, but it's pretty clear how you can change that if you like. [Another approach would involve refactoring the upstream stuff, so that the bits are added to the cache earlier, when we still have the original file.]

   2. With only the low-res bits in the image, a visitor needs to not only sync from a server, but also get the high-res bits from someone. These are similar, but not identical: i.e., when you've arranged for one of these to happen, the other doesn't automatically happen too. You have to arrange for both. Without this patch, this may or may not have been obvious in any given application, and it may be more obvious with the patch.
 DropThumbnail.2.cs.gz [^] (3,248 bytes) 06-01-06 22:27

Notes
(0008540)
howardstearns   
12-04-06 21:51   
This is fixed to my satisfaction in the K... classes (Wisconsin package).