Skip to content

Large 2htdp/image values displayed in DrRacket interactions get clipped, confusing #809

Open

Description

@jasonhemann

Because the DrRacket interactions window seems to clip overly-large images, two images that should look very visibly distinct in the interactions window can actually end up resembling one another.

#lang htdp/isl+
(require 2htdp/image)

(define BIG-CIRCLE (circle 3000 "solid" "blue"))

(define ACTUALLY-CLIPPED-CIRCLE
  (crop 0 0 4167 6000 BIG-CIRCLE))

BIG-CIRCLE
ACTUALLY-CLIPPED-CIRCLE
(image-width BIG-CIRCLE)
(image-height BIG-CIRCLE)
(image-width ACTUALLY-CLIPPED-CIRCLE)
(image-height ACTUALLY-CLIPPED-CIRCLE)

When a user copies that clipped image back to the definitions window, the clipped cache silently becomes the copied/exported representation of the full image.

Copying and pasting such an image into a check-expect leads to perhaps-surprising test failure error messages, where the images look the same but its frames that look different.

Image

Activity

  1. rfindler commented on Apr 28, 2026

    @rfindler
    Member

    There needs to be something to prevent poor ole' drracket from going nuts drawing large images, but I'm open to other approaches to make this work a little better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions