<div dir="ltr">Ah. I'm not sure which change affected this, but in the git version from last night I see a solid red square (and I do see the same thing as you in 5.3.6).<div><br></div><div>Robby</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Nov 18, 2013 at 6:36 PM, Daniel Prager <span dir="ltr"><<a href="mailto:daniel.a.prager@gmail.com" target="_blank">daniel.a.prager@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Image attached.<div><br></div><div>System: Mac, OS X 10.8.5, Racket 5.3.6.</div><div><br></div><div>Dan</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Tue, Nov 19, 2013 at 11:28 AM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm not seeing what you're seeing, I think. Can you send a screenshot (or a pointer to it)?<div>



<br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Mon, Nov 18, 2013 at 5:59 PM, Daniel Prager <span dir="ltr"><<a href="mailto:daniel.a.prager@gmail.com" target="_blank">daniel.a.prager@gmail.com</a>></span> wrote:<br>




</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Why does the following code generate visual artefacts along the right and bottom<div>



edges of the image?  How do I eliminate it?</div>
<div><br></div><div><div>#lang racket</div><div>(require 2htdp/image)</div>

<div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>(define (crop-to-aspect-ratio im final-width final-height)</div></div><div><div>  (let* ([W (image-width im)]</div></div><div><div>






         [H (image-height im)]</div></div><div><div>         [wh-ratio (/ final-width final-height)]</div></div><div><div>         [w (* wh-ratio H)]</div></div><div><div>         [h (/ W wh-ratio)]</div></div><div><div>





         [image (if (<= W w)</div>
</div><div><div>                    (crop 0 (/ (- H h) 2) W h im)</div></div><div><div>                    (crop (/ (- W w) 2) 0 w H im))])</div></div><div><div>    (freeze (scale (/ final-width (image-width image))</div>






</div><div><div>                   image))))</div></div><div><div><br></div></div><div><div>(scale 5</div></div><div><div>       (crop-to-aspect-ratio</div></div><div><div>        (freeze (rectangle 259 356 'solid 'red))</div>






</div><div><div>        40 56))</div></div></blockquote><div><div><br></div><div>Note that the two freeze instructions are essential -- the one in the crop routine</div><div> forces pixelation, which I want -- and the one in the calling code simulates starting with a bitmap.</div>






<div><br></div><div>Thanks </div><div><br></div><div>Dan</div><div dir="ltr"><div style="font-family:arial;font-size:small"></div></div>
</div></div>
<br></div></div>____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><div style="font-family:arial;font-size:small"><b>Daniel Prager</b></div><div style="font-family:arial;font-size:small">
Agile/Lean Coaching, Software Development and Leadership</div>


<div style="font-family:arial;font-size:small"><font color="#999999">Twitter:</font> <a href="https://twitter.com/agilejitsu" style="color:rgb(17,85,204)" target="_blank">@agilejitsu</a> </div><div style="font-family:arial;font-size:small">



<font color="#999999">Blog:</font> <a href="http://agile-jitsu.blogspot.com/" style="color:rgb(17,85,204)" target="_blank">agile-jitsu.blogspot.com</a></div></div>
</font></span></div></div>
</blockquote></div><br></div>