Permalink
Browse files

Revert "When using nearest neighbor interpolation and not actually sc…

…aling, just copy the data. (Note we don't do this for other kinds of interpolation, because the filtering on those interpolations could have an effect even when not actually scaling.)"

This reverts commit 1c9f9b5.
  • Loading branch information...
1 parent 527fd07 commit aaae0bdfce138bf7dc1078c22c03d23efd587d99 @dmcdougall committed Jan 21, 2013
Showing with 5 additions and 9 deletions.
  1. +5 −9 src/_image.cpp
View
@@ -440,15 +440,11 @@ Image::resize(const Py::Tuple& args, const Py::Dict& kwargs)
case NEAREST:
{
- if (colsIn == numcols && rowsIn == numrows) {
- memcpy(bufferOut, bufferIn, colsIn * rowsIn * 4);
- } else {
- typedef agg::span_image_filter_rgba_nn<img_accessor_type, interpolator_type> span_gen_type;
- typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
- span_gen_type sg(ia, interpolator);
- renderer_type ri(rb, sa, sg);
- agg::render_scanlines(ras, sl, ri);
- }
+ typedef agg::span_image_filter_rgba_nn<img_accessor_type, interpolator_type> span_gen_type;
+ typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
+ span_gen_type sg(ia, interpolator);
+ renderer_type ri(rb, sa, sg);
+ agg::render_scanlines(ras, sl, ri);
}
break;

0 comments on commit aaae0bd

Please sign in to comment.