Skip to content

Instantly share code, notes, and snippets.

Last active June 7, 2017 21:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Subpixel image resizing using imagemagick convert
convert ResizeTestImage.png -gamma 0.5 -filter Mitchell -resize 800x200! -morphology Convolve "3x1: 0.33, 0.34, 0.33" -channel Red -morphology Convolve "3x1: 0.0, 0.0, 1.0" -channel Green -morphology Convolve "3x1: 0.0, 1.0, 0.0" -channel Blue -morphology Convolve "3x1: 1, 0, 0" +channel -filter Point -resize 267x200! -gamma 2.0 -depth 8 ResizeTestSubpixel.png
Copy link

pavel-perina commented Jun 7, 2017

Resize with subpixel accuracy (cleartype)
Based on i believe this thread and here is the result of image downscaled from 800x600 to 267x200 pixels. Bottom image is for comparison.


I believe it's more suitable for vector graphics (fonts, graphs, ...) and photos seem to be more blurred

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