153 for the thumbNail picture, |
153 for the thumbNail picture, |
154 we can temporarily switch to a rough dither. |
154 we can temporarily switch to a rough dither. |
155 (this speeds up the thing quite a bit |
155 (this speeds up the thing quite a bit |
156 " |
156 " |
157 (image depth > 2 |
157 (image depth > 2 |
158 and:[Color fixColors isNil]) ifTrue:[ |
158 and:[device fixColors isNil]) ifTrue:[ |
159 "temporarily go to a 3x3x2 colormap ..." |
159 "temporarily go to a 3x3x2 colormap ..." |
160 Object errorSignal handle:[:ex | |
160 Object errorSignal handle:[:ex | |
161 'very low resolution colors' infoPrintNL. |
161 'very low resolution colors' infoPrintNL. |
162 Object errorSignal handle:[:ex | |
162 Object errorSignal handle:[:ex | |
163 'cannot allocate dither colors' infoPrintNL. |
163 'cannot allocate dither colors' infoPrintNL. |
164 ex return |
164 ex return |
165 ] do:[ |
165 ] do:[ |
166 Color getColorsRed:2 green:2 blue:2. |
166 Color getColorsRed:2 green:2 blue:2 on:device. |
167 ] |
167 ] |
168 ] do:[ |
168 ] do:[ |
169 Color getColorsRed:5 green:5 blue:3. |
169 Color getColorsRed:5 green:5 blue:3 on:device. |
170 ]. |
170 ]. |
171 previewField label:image. |
171 previewField label:image. |
172 Color releaseDitherColors. |
172 device releaseFixColors. |
173 ] ifFalse:[ |
173 ] ifFalse:[ |
174 previewField label:image. |
174 previewField label:image. |
175 ] |
175 ] |
176 ] |
176 ] |
177 ] |
177 ] |