[squeak-dev] Re: Squeak 4.4 release todo list

Frank Shearar frank.shearar at gmail.com
Thu Nov 22 18:44:03 UTC 2012


This gives a slightly (as in "I can see it with a MagnifierMorph but
otherwise not) cleaner horizontal join, together with your original
nice vertical join:

| form |
form := (PNGReadWriter formFromFileNamed:
'/home/frank/Documents/squeak/blur_ulam_1.png') asFormOfDepth: 32.

0 to: form height - 1 do: [ :y |
        form
                colorAt: form width-1 at y
                put: ((form colorAt: 0 at y)
                        mixed: 0.5
                        with: (form colorAt: form width-2 at y)).
        form
                colorAt: 0 at y
                put: ((form colorAt: 2 at y)
                        mixed: 0.5
                        with: (form colorAt: form width-1 at y))
].

0 to: form width do: [:x | | top bottom |
	top := form colorAt: x at 0.
	bottom := form colorAt: x@(form height - 1).
	form colorAt: x at 0 put: (top mixed: 0.5 with: bottom).
	form colorAt: x@(form height - 1) put: (top mixed: 0.5 with: bottom)].

ActiveWorld color: (InfiniteForm with: form).

"MagnifierMorph newRound openInWorld"

On 22 November 2012 17:25, Bob Arning <arning315 at comcast.net> wrote:
> You could also just swap some of the pixels:
>
> | w h f |
> f := (PNGReadWriter formFromFileNamed:
> '/Users/bob/squeak/Squeak4.3/blur_ulam_1.png') asFormOfDepth: 32.
> w := f width - 1.
> h := f height - 1.
> 0 to: h by: 2 do: [ :y || c |
>     c := f colorAt: 0 at y.
>     f colorAt: 0 at y put: (f colorAt: w at y).
>     f colorAt: w at y put: c.
> ].
> 0 to: w by: 2 do: [ :x || c |
>     c := f colorAt: x at 0.
>     f colorAt: x at 0 put: (f colorAt: x at h).
>     f colorAt: x at h put: c.
> ].
> ActiveWorld color: (InfiniteForm with: f)
>
> Cheers,
> Bob
>
> On 11/22/12 10:14 AM, Frank Shearar wrote:
>
> On 22 November 2012 14:27, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> On 2012-11-22, at 14:27, Frank Shearar <frank.shearar at gmail.com> wrote:
>
> On 21 November 2012 18:22, Bob Arning <arning315 at comcast.net> wrote:
>
> It's always fun to try it with Squeak. convert the form to 32 bits and try
> this:
>
> 0 to: self height - 1 do: [ :y |
>    self colorAt: self width-1 at y put: ((self colorAt: 0 at y) mixed: 0.5 with:
> (self colorAt: self width-2 at y)).
>    self colorAt: 0 at y put: ((self colorAt: 2 at y) mixed: 0.5 with: (self
> colorAt: self width-1 at y))
> ].
>
> Seems to fuzz it up pretty well.
>
> That's exactly what I'd like to do. The form's an 8 bit ColorForm
> though, and doesn't like depths > 8. So I thought I'd be extra clever
> and make a 32 bit form and copy the bits:
>
> | form |
> form := PNGReadWriter formFromFileNamed:
> '/home/frank/Downloads/blur_ulam_1.png'.
> form := (Form extent: form extent depth: 32) bits: form bits.
>
> You can't just use an 8 bit form's bits in a 32 bit form. Use
> asFormOfDepth:.
>
> Ah! That works. OK, so I need just fix the horizontal glitch in a
> similar manner and I'll be happy.
>
> Thanks, Bert!
>
> frank
>
> - Bert -
>
> 0 to: form height - 1 do: [ :y |
>       form
>               colorAt: form width-1 at y
>               put: ((form colorAt: 0 at y)
>                       mixed: 0.5
>                       with: (form colorAt: form width-2 at y)).
>       form
>               colorAt: 0 at y
>               put: ((form colorAt: 2 at y)
>                       mixed: 0.5
>                       with: (form colorAt: form width-1 at y)) asFloat
> ].
>
> ActiveWorld color: (InfiniteForm with: form)
>
> However, I still can't run the script, because I get an "Error: Bad
> BitBlt arg (Fraction?). I can't even just wrap-and-resume the Error
> because, of course, Error is not resumable.
>
> Ideas? What am I missing?
>
> frank
>
> Cheers,
> Bob
>
> On 11/21/12 10:53 AM, Frank Shearar wrote:
>
> On 21 November 2012 14:39, Frank Shearar <frank.shearar at gmail.com> wrote:
>
> Hi folks,
>
> Apologies for the silence: things have been a bit busy.
>
> Test wise we're looking pretty good. We still have a few red lights but I
> don't see much point in delaying further: some of the test failures are
> because of VM sensitivities.
>
> Off the top of my head we/I still need to write a changelog, and otherwise a
> bunch of infrastructural stuff's all that's needed: a new update stream,
> switching it over, etc. I wrote a ReleaseBuilder script but of course should
> actually publish it.
>
> I've also nearly finished the new background, and just need to figure out
> how to clean the edges of the pic to make it tile properly. Given I'm
> writing this mail on my phone I will have to mail the proposed image
> separately, at a later stage.
>
> For better or worse, here it is. Test it with
>
>    ActiveWorld color: (InfiniteForm with: (PNGReadWriter
> readFromFileNamed: 'my/path/to/blur_ulam_1.png'))
>
> Note the strange vertical white-ish line between the tiles. The image
> is filled all the way to the edge, but the left and right edges differ
> sufficiently to create the artifact. I'm not sure how to get rid of
> it, never having attempted to make a tile-able image before.
>
> Anyone spot anything missing off the swiki release page?
>
> That would be http://wiki.squeak.org/squeak/6188.
>
> frank
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


More information about the Squeak-dev mailing list