Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aaae0bd

Browse filesBrowse files
committed
Revert "When using nearest neighbor interpolation and not actually scaling, 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.
1 parent 527fd07 commit aaae0bd
Copy full SHA for aaae0bd

File tree

Expand file treeCollapse file tree

1 file changed

+5
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-9
lines changed

‎src/_image.cpp

Copy file name to clipboardExpand all lines: src/_image.cpp
+5-9Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -440,15 +440,11 @@ Image::resize(const Py::Tuple& args, const Py::Dict& kwargs)
440440

441441
case NEAREST:
442442
{
443-
if (colsIn == numcols && rowsIn == numrows) {
444-
memcpy(bufferOut, bufferIn, colsIn * rowsIn * 4);
445-
} else {
446-
typedef agg::span_image_filter_rgba_nn<img_accessor_type, interpolator_type> span_gen_type;
447-
typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
448-
span_gen_type sg(ia, interpolator);
449-
renderer_type ri(rb, sa, sg);
450-
agg::render_scanlines(ras, sl, ri);
451-
}
443+
typedef agg::span_image_filter_rgba_nn<img_accessor_type, interpolator_type> span_gen_type;
444+
typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
445+
span_gen_type sg(ia, interpolator);
446+
renderer_type ri(rb, sa, sg);
447+
agg::render_scanlines(ras, sl, ri);
452448
}
453449
break;
454450

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.