Skip to content

[FRAM-555] Mimic Android CenterCrop behavior when dithering with ResizeFill - #58

Merged
jtomson merged 1 commit into
masterfrom
fix_dither_fill
Jan 7, 2026
Merged

jtomson merged 1 commit into
masterfrom
fix_dither_fill

Conversation

@jtomson

@jtomson jtomson commented Jan 7, 2026 •

Copy link
Copy Markdown

We assume in the app preview that we will apply a Center Crop if necessary by default. This happens by rendering an image that is smaller than the target, and letting the frame app scale it up on its own. Since we have to return an exact-size image intead of allowing the frame to scale a dithered image, we apply this behavior before rendering.

For a fill URL:

http://localhost:8080/pushd/00000000-0000-0000-0000-000000000000/rotate_0__width_1200__height_1600__rt_fill__dither_fs:opts06:0.65:w:61.09:-3.23:-2.32:r:24.57:39.54:29.4:g:31:-19.68:5.44:bk:10.84:8.34:-14.61:bl:28.68:4.02:-35.99:y:57.07:-7.1:60.33__tall.jpg?cs=srgb&w=1200&h=1600

Before:

tall

After:

tall-2

Will test with other images as well

@notion-workspace

Copy link
Copy Markdown

@bantonj bantonj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🖼️

@jtomson
jtomson merged commit ec9a135 into master Jan 7, 2026
10 checks passed
jtomson added a commit that referenced this pull request Nov 3, 2026
Point pushd-dither at the #58 merge commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants