Commit Graph

20 Commits

Author SHA1 Message Date
jst
9485f5475a Return input image if output dimensions equal input dimensions. 2014-12-17 11:10:53 +01:00
jst
20c6afea04 Remove unnecessary benchmark 2014-09-15 11:58:05 +02:00
jst
220cad3343 Add simple test case for input image with non-trivial bounds. 2014-08-13 20:12:18 +02:00
jst
016a61cd31 Optimize data-locality for a huge increase in processing speed.
This is a complete rewrite! The tight scaling loop needs data locality for optimal performance. The old version used lots of pointer redirections to access image data which was bad for data locality. By providing the complete loop for each image type, this problem is solved. Unfortunately this increases code duplication but the result should be worth it: I could measure a ~6x speed-up for certain test cases!
2014-07-19 13:19:31 +02:00
jst
446eea2f7b Remove LUT based filters.
Caching kernel weights makes using the LUT based approach obsolete. Now they seem to be even slower than their counterparts.
2014-01-28 18:54:57 +01:00
jst
8f586c4f06 Add benchmarks to compare execution times.
Run "go test -bench LargeJpegThumb" to benchmark all functions at once.
2014-01-18 11:55:34 +01:00
jst
252ccc84a2 Add benchmarks for Lanczos3Lut to compare it with Lanczos3 performance. 2013-07-08 20:55:46 +02:00
jst
da95f74904 go fmt 2013-03-10 11:55:50 +01:00
jst
852f4a47e7 Merge branch 'no-image-shift' of http://github.com/jsummers/nfnt.resize
Merge branch 'fix-canvas-size-issue'
2013-03-10 11:33:44 +01:00
jst
84039c403b Test for correct canvas size. 2013-03-10 10:58:08 +01:00
Jason Summers
3d9094eb9e Center the resized image on the canvas, instead of shifting it slightly 2012-11-27 20:38:19 -05:00
jst
3e06045c3f Speed up computation: Try to avoid Image.At() as much as possible -> specialized color access for some image types 2012-09-21 20:02:25 +02:00
jst
e548f52385 Blur input image during downscaling by scaling the filter kernel to prevent moires in the output image 2012-09-19 21:03:56 +02:00
jst
d0b2b9bc39 Added MitchellNetravali, changed Lanczos a bit 2012-09-19 19:32:00 +02:00
jst
3fc31c95cc Kernel simplified 2012-09-15 19:30:32 +02:00
jst
339b8fd43a Speed up calculation by avoiding dynamic casting 2012-09-01 00:21:10 +02:00
jst
9041d4db18 Function signature changed again, no need for multiple return value 2012-08-09 18:58:57 +02:00
jst
14d51db8b4 Changed function signature to include error handling. Filters simplified. 2012-08-08 21:32:51 +02:00
nfnt
fdc4a64918 Tests added 2012-08-03 18:12:26 +02:00
nfnt
428642c9f1 initial commit 2012-08-02 21:59:40 +02:00