imgproc.c: remove some useless code
The removed code was intended to clear the image to allow only drawing foreground pixels in the following loop. But it only drew the outline of a rectangle and thus did not clear the image as intended. Since the image is not cleared, the following loop already draws every pixel, overwriting any previously drawn rectangle anyway.
This commit is contained in:
@@ -260,12 +260,6 @@ Imlib_Image keep_pixels_filter(Imlib_Image *source_image, double thresh,
|
||||
width = imlib_image_get_width();
|
||||
new_image = imlib_clone_image();
|
||||
|
||||
/* draw white (background) rectangle to clear new image */
|
||||
imlib_context_set_image(new_image);
|
||||
ssocr_set_color(BG);
|
||||
imlib_image_draw_rectangle(0, 0, width, height);
|
||||
imlib_context_set_image(*source_image);
|
||||
|
||||
/* check for every pixel if it should be set in filtered image */
|
||||
for(x=0; x<width; x++) {
|
||||
for(y=0; y<height; y++) {
|
||||
|
||||
Reference in New Issue
Block a user