diff --git a/apps/picview/pic_view.cpp b/apps/picview/pic_view.cpp index 63622f46d..7072be82c 100644 --- a/apps/picview/pic_view.cpp +++ b/apps/picview/pic_view.cpp @@ -9,12 +9,6 @@ PicView::PicView() : void PicView::drawRect(KDContext * ctx, KDRect rect) const { KDColor * pixels = (KDColor *)apps_picview_image_raw; - KDCoordinate width = bounds().width(); - KDCoordinate height = bounds().height(); - assert(apps_picview_image_raw_len == width*height*sizeof(KDColor)); - for (int j=0; jsetPixel(KDPoint(i,j), pixels[j*width+i]); - } - } + assert(apps_picview_image_raw_len == bounds().width() * bounds().height() * sizeof(KDColor)); + ctx->fillRectWithPixels(bounds(), pixels, nullptr); }