Show a patch.

GET /api/1.1/patches/2653/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2653,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/2653/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2653/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20200116225015.27031-1-kieran.bingham@ideasonboard.com>",
    "date": "2020-01-16T22:50:15",
    "name": "[libcamera-devel,RFC] qcam: Support software scaling of the ViewFinder",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e4ccb02cd5ba8fcc3e3064b7019fab7bb640d597",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": {
        "id": 11,
        "url": "https://patchwork.libcamera.org/api/1.1/users/11/?format=api",
        "username": "kbingham",
        "first_name": "Kieran",
        "last_name": "Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/2653/mbox/",
    "series": [
        {
            "id": 629,
            "url": "https://patchwork.libcamera.org/api/1.1/series/629/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=629",
            "date": "2020-01-16T22:50:15",
            "name": "[libcamera-devel,RFC] qcam: Support software scaling of the ViewFinder",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/629/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2653/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2653/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 931B960705\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 16 Jan 2020 23:50:19 +0100 (CET)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C8722D2;\n\tThu, 16 Jan 2020 23:50:19 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1579215019;\n\tbh=p81KOyVTV/HUTvsK0fDzAgfd+FLaJxjAHBj6bXoulqo=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=d6tEybR56jEwyblYq7zHfKJj6m36f2BNX4i6DH26bwDuY0iuuXs+iMcM82l4zpLNG\n\tb9cfn5Wy+qmVvMd7xmTtiGBdLFunSMxXTX+lNWNPjrNMBQde0aCA6LN2fQzeCvq0Y0\n\tiWp1WoTZ89f+Zb69OhXAel077xRBaJSINpbfoInk=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Thu, 16 Jan 2020 22:50:15 +0000",
        "Message-Id": "<20200116225015.27031-1-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC PATCH] qcam: Support software scaling of the\n\tViewFinder",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Thu, 16 Jan 2020 22:50:19 -0000"
    },
    "content": "Introduce software rescaling of the ViewFinder.\nWhen rescaling, this will introduce a performance penalty.\n\nThe resizing is not limited to the aspect ratio of the image.\nIf supporting software resizing is desireable, we may wish to impose at\nleast mataining the aspect ratio of the capture images.\n\nSuggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nI'm not actually expecting this patch to be integrated (maybe we decide it's\nuseful, I'm not sure yet), but I wanted to post it in case it is useful to\nanyone else.\n\nThe topic of being able to resize the QCam window (even at the expense of\nsoftware scaling) came up and we discovered it is only a few lines to remove\nour fixed size restrictions.\n\n\n src/qcam/main_window.cpp | 1 -\n src/qcam/viewfinder.cpp  | 3 +--\n 2 files changed, 1 insertion(+), 3 deletions(-)",
    "diff": "diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex 1d9c756f147a..df51fa888342 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -33,7 +33,6 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options)\n \n \tviewfinder_ = new ViewFinder(this);\n \tsetCentralWidget(viewfinder_);\n-\tviewfinder_->setFixedSize(500, 500);\n \tadjustSize();\n \n \tret = openCamera(cm);\ndiff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp\nindex 98a8ab68e5f6..9f92e11d5cf6 100644\n--- a/src/qcam/viewfinder.cpp\n+++ b/src/qcam/viewfinder.cpp\n@@ -14,6 +14,7 @@\n ViewFinder::ViewFinder(QWidget *parent)\n \t: QLabel(parent), format_(0), width_(0), height_(0), image_(nullptr)\n {\n+\tsetScaledContents(true);\n }\n \n ViewFinder::~ViewFinder()\n@@ -42,8 +43,6 @@ int ViewFinder::setFormat(unsigned int format, unsigned int width,\n \twidth_ = width;\n \theight_ = height;\n \n-\tsetFixedSize(width, height);\n-\n \tdelete image_;\n \timage_ = new QImage(width, height, QImage::Format_RGB32);\n \n",
    "prefixes": [
        "libcamera-devel",
        "RFC"
    ]
}