[BUG] A blue painting is changed into a black one when a project is saved
Ned Konz
ned at bike-nomad.com
Wed Jun 26 13:16:40 UTC 2002
On Wednesday 26 June 2002 12:03 am, Kazuhiro ABE wrote:
> A blue(or some color) painting is changed into a black one when a
> project is saved.
>
> 1. Enter a new project
> 2. Paint a sketch with a blue brush
> 3. Publish this project
> 4. Find and load this project
> 5. A blue painting is changed into a black one
>
> I am using Dan's latest 3.2gamma2 with default settings(depth 16
> big endian) on Win98SE.
>
> VM: Win32 - Squeak3.2gamma of 12 January 2002 [latest update:
> #4879] Image: Squeak3.2gamma [latest update: #4889]
I just ran into this myself when I posted Connectors. Bob Arning and
Andreas Raab helped me with it. Here's what Bob said about the
problem:
--------------
One of the problems was that some of the Forms in his project were
showing garbled colors when the project was downloaded. Here's the
sequence:
- Change set 4878 modified
ResourceCollector>>writeResourceForm:locator: to write resources
using GIFs or JPEGs
- This caused the resources to be loaded on the receiving system by
Form>>readNativeResourceFrom: rather than Form>>readResourceFrom:
- Form>>readNativeResourceFrom: has this curious bit
"Forget color map if any"
img _ Form extent: img extent depth: img depth bits: img bits.
img displayInterpolatedOn: self.
which means that ColorForms which result from a GIF loading will get
their colors replaced by something inappropriate. I changed this to
simply
img displayOn: self.
and all went well in this case.
-------------
and:
------------
If you want to make your project more robust, revert
ResourceCollector>>writeResourceForm:locator: to this version:
ar 5/30/2001 20:09 ResourceCollector
writeResourceForm:locator:
BEFORE publishing. That way your Forms will get handled correctly
whether the receiving end has the fix or not.
---------
I made the changes he suggested so that earlier images could load the
project.
I think it's important to get this fixed before 3.2 goes out, or we'll
break projects.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|