lencioni / SLIR

Smart Lencioni Image Resizer
MIT License
230 stars 56 forks source link

Add configurable sharpness #13

Closed tomcode closed 8 years ago

tomcode commented 12 years ago

I had noticed that SLIR adds visible sharpening (resizing big images), so I added this option. You can see it in action at http://bit.ly/O9MJRA, the originals are png's twice the size (preparation of Retina)

sebastianberns commented 12 years ago

My strategy was to manipulate the sharpen matrix:

array(
 array( 0,-1, 0),
 array(-1, x,-1),
 array( 0,-1, 0)
);

Is there a big difference between these two methods?

tomcode commented 12 years ago

I don not really understand the Math behind, my solution changes the x of Your example, just SLIR uses another base matrix.

My solution is based on playing around until I had found something that works and is easy to configure.

I propose to keep a simple way to configure the sharpness.