Skip to content

Conversation

@jnross
Copy link

@jnross jnross commented Jul 29, 2025

Supercedes #51 and #52, with the approach suggested in the comments there. This moves the special resizing of images for Ink to the end of the dithering step. This ensures that the resulting image is the right size, and that any black bars added to extend the image are not dithered and snowy.

I tested this by running imgproxy locally in docker like this:

docker run --name imgproxy -p 8080:8080 -e PUSH_S3_IMAGES_BUCKET=none -e PUSH_S3_RENDER_BUCKET=none -e IMGPROXY_USE_LOCAL="true" -e IMGPROXY_ALLOW_LOOPBACK_SOURCE_ADDRESSES=true -it imgproxy

And then I used URLs that pointed it to images running on a local simple HTTP server (i.e. python3 -m http.server 8080), with URLs like this:

http://localhost:8080/unsafe/rotate:0/width:1600/height:1200/rt:fit/dither:fs:opts05:w:61.02:-3.68:-2.42:r:24.26:39.62:29.22:g:31.12:-20.86:3.19:bk:9.37:9.19:-14.07:bl:27.85:5.29:-37.79:y:60.14:-11.6:63.22/padding:0:150:0:150/background:0:0:0/crop:472:436:nowe:0:16/plain/http://10.4.4.22:8000/IMG_0916.jpg?cs=srgb&w=1600&h=1200
Before After
before after_post_dither
before2 after_post_dither2

@jnross jnross requested a review from jtomson July 29, 2025 16:36
@notion-workspace
Copy link

@notion-workspace
Copy link

Copy link

@jtomson jtomson left a comment

Choose a reason for hiding this comment

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

awesome

@jnross
Copy link
Author

jnross commented Jul 29, 2025

@jtomson : So... after this has landed, what's the process of deployment? Is this a deploybot thing? Can we pair up to go through it? Should we do it in the morning instead of end of day?

@jnross jnross merged commit f843893 into master Jul 29, 2025
10 checks passed
@jtomson
Copy link

jtomson commented Jul 29, 2025

@jnross sure we can pair up tomorrow! shocker - it's a little different than how we deploy everything else

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.

3 participants