[{"id":23768,"web_url":"https://patchwork.libcamera.org/comment/23768/","msgid":"<CAHW6GYLCcSds+MzN3NxH-VRWnjsptX1NFYaAuHxxt__d-TtGZg@mail.gmail.com>","date":"2022-07-06T11:53:23","subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi William\n\nThanks very much for fixing this!\n\nOn Wed, 6 Jul 2022 at 11:18, David Plowman\n<david.plowman@raspberrypi.com> wrote:\n>\n> From: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n>\n> The exif tags are different between raw files from libcamera-apps and\n> from Picamera2, causing issues loading data.\n>\n> Add code to identify which tags are being used, and then load the\n> metadata from the correct tags.\n>\n> Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n> ---\n>  utils/raspberrypi/ctt/ctt_image_load.py | 26 ++++++++++++++++++-------\n>  1 file changed, 19 insertions(+), 7 deletions(-)\n>\n> diff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py\n> index 934db123..29c17581 100644\n> --- a/utils/raspberrypi/ctt/ctt_image_load.py\n> +++ b/utils/raspberrypi/ctt/ctt_image_load.py\n> @@ -301,17 +301,29 @@ def dng_load_image(Cam, im_str):\n>          metadata.read()\n>\n>          Img.ver = 100  # random value\n> -        Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> +        \"\"\"\n> +        libcamera-apps create a separate Exif.Subimage1 for the picture\n> +        picamera2 stores everything under Exif.Image\n> +        this code detects which one is being used, and therefore extracts the correct values\n> +        \"\"\"\n> +        try:\n> +            Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> +            subimage = \"SubImage1\"\n> +            photo = \"Photo\"\n> +        except KeyError:\n> +            Img.w = metadata['Exif.Image.ImageWidth'].value\n> +            subimage = \"Image\"\n> +            photo = \"Image\"\n>          Img.pad = 0\n> -        Img.h = metadata['Exif.SubImage1.ImageLength'].value\n> -        white = metadata['Exif.SubImage1.WhiteLevel'].value\n> +        Img.h = metadata[f'Exif.{subimage}.ImageLength'].value\n> +        white = metadata[f'Exif.{subimage}.WhiteLevel'].value\n>          Img.sigbits = int(white).bit_length()\n>          Img.fmt = (Img.sigbits - 4) // 2\n> -        Img.exposure = int(metadata['Exif.Photo.ExposureTime'].value*1000000)\n> -        Img.againQ8 = metadata['Exif.Photo.ISOSpeedRatings'].value*256/100\n> +        Img.exposure = int(metadata[f'Exif.{photo}.ExposureTime'].value*1000000)\n> +        Img.againQ8 = metadata[f'Exif.{photo}.ISOSpeedRatings'].value*256/100\n>          Img.againQ8_norm = Img.againQ8 / 256\n>          Img.camName = metadata['Exif.Image.Model'].value\n> -        Img.blacklevel = int(metadata['Exif.SubImage1.BlackLevel'].value[0])\n> +        Img.blacklevel = int(metadata[f'Exif.{subimage}.BlackLevel'].value[0])\n>          Img.blacklevel_16 = Img.blacklevel << (16 - Img.sigbits)\n>          bayer_case = {\n>              '0 1 1 2': (0, (0, 1, 2, 3)),\n> @@ -319,7 +331,7 @@ def dng_load_image(Cam, im_str):\n>              '2 1 1 0': (2, (3, 2, 1, 0)),\n>              '1 0 2 1': (3, (1, 0, 3, 2))\n>          }\n> -        cfa_pattern = metadata['Exif.SubImage1.CFAPattern'].value\n> +        cfa_pattern = metadata[f'Exif.{subimage}.CFAPattern'].value\n>          Img.pattern = bayer_case[cfa_pattern][0]\n>          Img.order = bayer_case[cfa_pattern][1]\n>\n> --\n> 2.30.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 813CCBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Jul 2022 11:53:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 33F7663311;\n\tWed,  6 Jul 2022 13:53:36 +0200 (CEST)","from mail-ed1-x536.google.com (mail-ed1-x536.google.com\n\t[IPv6:2a00:1450:4864:20::536])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B95360403\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Jul 2022 13:53:34 +0200 (CEST)","by mail-ed1-x536.google.com with SMTP id y4so5594464edc.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Jul 2022 04:53:34 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657108416;\n\tbh=fivWR6zfjBCgIDgmc/GT3G6iitgTD7oIdVKjKRq6vVs=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=jzIlB461ShBDAAholmhppKdI6/wYthIo8H7xHTKiYjLhnyp78tDtaqiFv2ll1YHpt\n\toTqc3BD9xMVggEzDYeEobgwn27UN2p6hNChuZQbYlPtn1gguwbBo8ezztAA2PwYXdb\n\tRfJksDDU/IgBKFeemmMdioU1R9rPlP2Fo6oKScXptOD2biQiQYELPoGkZGMmJAOPjw\n\t0gnLaJMxJ2aRG3qQSqlb5SrW6PeVPYAyP0E2mY7f6EKG6mggTG3djLjxBn8pQRTK/A\n\tpBmMOvrmIELB6imf2H4lQMfasVG6zKyLz+Nva+kbk5gxvoEzkMTdZ4Z8mHvXTx22G7\n\tM1LTRsvXC7TUA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to;\n\tbh=n8GL7H2oEOKkJVcfRs0OF0l70nyDT+56BXzinNIknxI=;\n\tb=CanuAdWor2N6bixGxZYgYxOaMRAhOEYEK9NnGG0J8Ldz/XC31hsI92KcGhqamAm2cf\n\tejVeptV+m5GNX151l79YGLORkSVPkvrc/PcnXSp5xiHfrKOQXQg7D3stb1m/lqF3SmIc\n\tkdvgqdE/lj7+qM0yHjfKGTwIqNGf2LHP7IkC8E7L9VIpN9Ylas4cmx/patrZvn10bGPr\n\tSe//qPBZraJxAbmqkRkTgLehmw0o7VIbABzTubGHcdetAJUuwJFuodQuf3pcMpospXkr\n\t0Bd4yZ9zLTCLFLNNu2I8Mfe0yi/SfS3un4KQr+loGPS0aYdoAc6iXv6RF3FaBGxnI92M\n\tRD4A=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"CanuAdWo\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to;\n\tbh=n8GL7H2oEOKkJVcfRs0OF0l70nyDT+56BXzinNIknxI=;\n\tb=4XDFETa97f4JsBZg6i5coS59vAN4yeRDlw0ctEwR5JJgNdjXT/Eh28R46200wRNyqn\n\the6eT+oOUOIlIoAqL0WOMNAqdz7ltkMANlayL3fQAh+1VT2n9IqjEZJBWZQl3TbdJT35\n\tX/45o8Gu/Pp5ZtqxxLglmyhfneN/N3CB1G+0cFroa1ajJTtlaGPcJYbN0vMazbWr2sly\n\tRY6RMPf5yGCpK8+5e5+LfvyVHSIKBbQVL7So3NcjTnLfJJxjzNNdTCv18FlPTXA+lrUv\n\tfhDNTiyExJHo7A0RGD75kMLHnaMZa4MgF48jpdXAiNvmxJ0AM3MztBEUOjc1qxq/D96U\n\t8XtA==","X-Gm-Message-State":"AJIora//fSNBDV5EKwPSRl4yjvSFUjTVyD2eeNm+SJJRWHdrDhKOe6rV\n\tKLBXpnBbc7Hax4fkfBxITPVWA0N+ZL6b8sjT/aEpLzaQ8a4=","X-Google-Smtp-Source":"AGRyM1sXY2ZsjgG+Wt6Ia3Uxt8W7t99IZu26qQpP5uAdj9RXFl0NSQOqoM9iCxOqssvnLZyYxxs45DM7ruvLpRZD1y4=","X-Received":"by 2002:a05:6402:22a1:b0:437:78c2:d02b with SMTP id\n\tcx1-20020a05640222a100b0043778c2d02bmr53416249edb.64.1657108413834;\n\tWed, 06 Jul 2022 04:53:33 -0700 (PDT)","MIME-Version":"1.0","References":"<20220706101836.20153-1-david.plowman@raspberrypi.com>\n\t<20220706101836.20153-4-david.plowman@raspberrypi.com>","In-Reply-To":"<20220706101836.20153-4-david.plowman@raspberrypi.com>","Date":"Wed, 6 Jul 2022 12:53:23 +0100","Message-ID":"<CAHW6GYLCcSds+MzN3NxH-VRWnjsptX1NFYaAuHxxt__d-TtGZg@mail.gmail.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>, \n\tWilliam Vinnicombe <william.vinnicombe@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","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>","From":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23774,"web_url":"https://patchwork.libcamera.org/comment/23774/","msgid":"<YsXVGvOF9mlPPkKC@pendragon.ideasonboard.com>","date":"2022-07-06T18:31:54","subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David and William,\n\nThank you for the patch.\n\nOn Wed, Jul 06, 2022 at 11:18:36AM +0100, David Plowman via libcamera-devel wrote:\n> From: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> \n> The exif tags are different between raw files from libcamera-apps and\n> from Picamera2, causing issues loading data.\n> \n> Add code to identify which tags are being used, and then load the\n> metadata from the correct tags.\n> \n> Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> ---\n>  utils/raspberrypi/ctt/ctt_image_load.py | 26 ++++++++++++++++++-------\n>  1 file changed, 19 insertions(+), 7 deletions(-)\n> \n> diff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py\n> index 934db123..29c17581 100644\n> --- a/utils/raspberrypi/ctt/ctt_image_load.py\n> +++ b/utils/raspberrypi/ctt/ctt_image_load.py\n> @@ -301,17 +301,29 @@ def dng_load_image(Cam, im_str):\n>          metadata.read()\n>  \n>          Img.ver = 100  # random value\n> -        Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> +        \"\"\"\n> +        libcamera-apps create a separate Exif.Subimage1 for the picture\n> +        picamera2 stores everything under Exif.Image\n\nIs this valid according to the DNG specification ? Or is it that\npicamera2 produces TIFF/EP files instead of DNG ? Is there a reason not\nto use DNG in all cases ?\n\n> +        this code detects which one is being used, and therefore extracts the correct values\n> +        \"\"\"\n> +        try:\n> +            Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> +            subimage = \"SubImage1\"\n> +            photo = \"Photo\"\n> +        except KeyError:\n> +            Img.w = metadata['Exif.Image.ImageWidth'].value\n> +            subimage = \"Image\"\n> +            photo = \"Image\"\n>          Img.pad = 0\n> -        Img.h = metadata['Exif.SubImage1.ImageLength'].value\n> -        white = metadata['Exif.SubImage1.WhiteLevel'].value\n> +        Img.h = metadata[f'Exif.{subimage}.ImageLength'].value\n> +        white = metadata[f'Exif.{subimage}.WhiteLevel'].value\n>          Img.sigbits = int(white).bit_length()\n>          Img.fmt = (Img.sigbits - 4) // 2\n> -        Img.exposure = int(metadata['Exif.Photo.ExposureTime'].value*1000000)\n> -        Img.againQ8 = metadata['Exif.Photo.ISOSpeedRatings'].value*256/100\n> +        Img.exposure = int(metadata[f'Exif.{photo}.ExposureTime'].value*1000000)\n> +        Img.againQ8 = metadata[f'Exif.{photo}.ISOSpeedRatings'].value*256/100\n>          Img.againQ8_norm = Img.againQ8 / 256\n>          Img.camName = metadata['Exif.Image.Model'].value\n> -        Img.blacklevel = int(metadata['Exif.SubImage1.BlackLevel'].value[0])\n> +        Img.blacklevel = int(metadata[f'Exif.{subimage}.BlackLevel'].value[0])\n>          Img.blacklevel_16 = Img.blacklevel << (16 - Img.sigbits)\n>          bayer_case = {\n>              '0 1 1 2': (0, (0, 1, 2, 3)),\n> @@ -319,7 +331,7 @@ def dng_load_image(Cam, im_str):\n>              '2 1 1 0': (2, (3, 2, 1, 0)),\n>              '1 0 2 1': (3, (1, 0, 3, 2))\n>          }\n> -        cfa_pattern = metadata['Exif.SubImage1.CFAPattern'].value\n> +        cfa_pattern = metadata[f'Exif.{subimage}.CFAPattern'].value\n>          Img.pattern = bayer_case[cfa_pattern][0]\n>          Img.order = bayer_case[cfa_pattern][1]\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9E110BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Jul 2022 18:32:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0356F60403;\n\tWed,  6 Jul 2022 20:32:21 +0200 (CEST)","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 676F360403\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Jul 2022 20:32:19 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CD98030A;\n\tWed,  6 Jul 2022 20:32:18 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657132341;\n\tbh=hM00UPwEIoxnqKIkt6oslfCstc8K1O6JBkJYGh4Gf+0=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=14J2RvzU/v8N5u5s6lGBkK48pteCEBormlaP2lhNQjvJDYFjGq7TGXXUL5qWAcVTA\n\tp175aq0DhmjuvGjMAF4bcRwbwZjEr4nQbaXTWq2BqpL4ht9HhoiCXKm++UNizWjUoK\n\t6G6oX1jpcSI9FGJsqn6Uxt+Un2B6JofVWZnbM6JxhSCUITVaVgXtTkPp4qTRS+nX/e\n\tg+iGMRqqhF3xYPRd56rp/lGeJEKNKXFJfpbFgBc9mjjVm6qVEVOHvD3yctKS8ehquh\n\t5NuE1R6P3EJtBvaCxYnLyE6729ZE5pyeYNvVX9r3+j2EzJGM0gSMA4rmAZQoEke9WY\n\tYpBKeWcm4/DkQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657132339;\n\tbh=hM00UPwEIoxnqKIkt6oslfCstc8K1O6JBkJYGh4Gf+0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=wVhHLwDrHHcGE46EBCoK8iW+C73tGE+Zmq3N8lutWp9VxiK5kdwKLI3XAGnXvEaSW\n\thebGxLNESEj8dRtej+cSz4tuAY/gVHFxZRUXmg7Hzfjh2jW8iWR4X+ph194yfqwcrC\n\teNaJ/avbJ+SJDIktjKlp3ZnAnLC6DnFyPcYXMmg4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"wVhHLwDr\"; dkim-atps=neutral","Date":"Wed, 6 Jul 2022 21:31:54 +0300","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YsXVGvOF9mlPPkKC@pendragon.ideasonboard.com>","References":"<20220706101836.20153-1-david.plowman@raspberrypi.com>\n\t<20220706101836.20153-4-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220706101836.20153-4-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, william.vinnicombe@raspberrypi.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23781,"web_url":"https://patchwork.libcamera.org/comment/23781/","msgid":"<CAHW6GYKZdK6gfXAgsD+=DGya0qbDfu+q83Be5zxfuzpzUcAWbg@mail.gmail.com>","date":"2022-07-07T07:35:39","subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Laurent\n\nThanks for the review!\n\nOn Wed, 6 Jul 2022 at 19:32, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi David and William,\n>\n> Thank you for the patch.\n>\n> On Wed, Jul 06, 2022 at 11:18:36AM +0100, David Plowman via libcamera-devel wrote:\n> > From: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> >\n> > The exif tags are different between raw files from libcamera-apps and\n> > from Picamera2, causing issues loading data.\n> >\n> > Add code to identify which tags are being used, and then load the\n> > metadata from the correct tags.\n> >\n> > Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> > ---\n> >  utils/raspberrypi/ctt/ctt_image_load.py | 26 ++++++++++++++++++-------\n> >  1 file changed, 19 insertions(+), 7 deletions(-)\n> >\n> > diff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py\n> > index 934db123..29c17581 100644\n> > --- a/utils/raspberrypi/ctt/ctt_image_load.py\n> > +++ b/utils/raspberrypi/ctt/ctt_image_load.py\n> > @@ -301,17 +301,29 @@ def dng_load_image(Cam, im_str):\n> >          metadata.read()\n> >\n> >          Img.ver = 100  # random value\n> > -        Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> > +        \"\"\"\n> > +        libcamera-apps create a separate Exif.Subimage1 for the picture\n> > +        picamera2 stores everything under Exif.Image\n>\n> Is this valid according to the DNG specification ? Or is it that\n> picamera2 produces TIFF/EP files instead of DNG ? Is there a reason not\n> to use DNG in all cases ?\n\nActually DNG and EXIF are all really flavours of TIFF. I would say\nthat Picamera2, which uses the PiDNG library, does it properly. In C++\nwe use libtiff which, as far as I can tell, doesn't really support\n\"modern\" flavours of DNG-style TIFF. For example, you can't include\nexposure times in the main image which PiDNG can.\n\nBut they are all DNGs, and DarkTable, RawTherapee and dcraw support\nall of them. Just there are some annoying implementation details...\n\nDavid\n\n>\n> > +        this code detects which one is being used, and therefore extracts the correct values\n> > +        \"\"\"\n> > +        try:\n> > +            Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> > +            subimage = \"SubImage1\"\n> > +            photo = \"Photo\"\n> > +        except KeyError:\n> > +            Img.w = metadata['Exif.Image.ImageWidth'].value\n> > +            subimage = \"Image\"\n> > +            photo = \"Image\"\n> >          Img.pad = 0\n> > -        Img.h = metadata['Exif.SubImage1.ImageLength'].value\n> > -        white = metadata['Exif.SubImage1.WhiteLevel'].value\n> > +        Img.h = metadata[f'Exif.{subimage}.ImageLength'].value\n> > +        white = metadata[f'Exif.{subimage}.WhiteLevel'].value\n> >          Img.sigbits = int(white).bit_length()\n> >          Img.fmt = (Img.sigbits - 4) // 2\n> > -        Img.exposure = int(metadata['Exif.Photo.ExposureTime'].value*1000000)\n> > -        Img.againQ8 = metadata['Exif.Photo.ISOSpeedRatings'].value*256/100\n> > +        Img.exposure = int(metadata[f'Exif.{photo}.ExposureTime'].value*1000000)\n> > +        Img.againQ8 = metadata[f'Exif.{photo}.ISOSpeedRatings'].value*256/100\n> >          Img.againQ8_norm = Img.againQ8 / 256\n> >          Img.camName = metadata['Exif.Image.Model'].value\n> > -        Img.blacklevel = int(metadata['Exif.SubImage1.BlackLevel'].value[0])\n> > +        Img.blacklevel = int(metadata[f'Exif.{subimage}.BlackLevel'].value[0])\n> >          Img.blacklevel_16 = Img.blacklevel << (16 - Img.sigbits)\n> >          bayer_case = {\n> >              '0 1 1 2': (0, (0, 1, 2, 3)),\n> > @@ -319,7 +331,7 @@ def dng_load_image(Cam, im_str):\n> >              '2 1 1 0': (2, (3, 2, 1, 0)),\n> >              '1 0 2 1': (3, (1, 0, 3, 2))\n> >          }\n> > -        cfa_pattern = metadata['Exif.SubImage1.CFAPattern'].value\n> > +        cfa_pattern = metadata[f'Exif.{subimage}.CFAPattern'].value\n> >          Img.pattern = bayer_case[cfa_pattern][0]\n> >          Img.order = bayer_case[cfa_pattern][1]\n> >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EB118BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Jul 2022 07:35:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5E2CC6330E;\n\tThu,  7 Jul 2022 09:35:54 +0200 (CEST)","from mail-ej1-x631.google.com (mail-ej1-x631.google.com\n\t[IPv6:2a00:1450:4864:20::631])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11F5860401\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Jul 2022 09:35:52 +0200 (CEST)","by mail-ej1-x631.google.com with SMTP id h23so30860203ejj.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 07 Jul 2022 00:35:52 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657179354;\n\tbh=GPtg03vHROxVbB/bVT0S4S36VBRLQUutAWLC8Rg+ijU=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=mbmtf9S6b6WkU36mlX7X4oa52qodrT9l6JHSykeQfJz1f6je24HrKaPp/IzhDxDSW\n\tnqIUvsglQXwxQFbcL9alh30Du3h24pnYxwIlM1IymCKeqlHH2aO+LEEnusFiYJuHSG\n\tTipbemzBBJIjFcgUQDE+N2iT0/JJtYl0g9gZ+qgSibiX97Aoz3zs9gRB0CC8qtbfDr\n\tuDBcHZnELTbDVFy8OibY21CytwFzsUZY9k5oxgmp+bVEFSEb/8K0aiN+p4T7LTUzmK\n\tbJiejSNR3KEjAhU67D04SAoYcix3tFltJeeNHj+V3mo7mxoTavBTUxh8ybTKHmCdvy\n\tlpoFRg0LiD3EA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=hqXvSLF/FzJ8ZxnaWzq1DqalMXYpvLKpZLB9ZCH1uxE=;\n\tb=Dzl7wLUvBn1DJGzgApmWnB4hb4iZOXRk5m6dtOXQwzJX+Imgel6Jaf9oiXNtbPBCKN\n\tnQfEIxccRe7XP5BkuXivfZNtFi86hlS4G6blMOLbDANoWM6+IdSdR3VUe3FTAq4Bp+6f\n\t4+pOn1Oilf8ckZ28RNNJ2jMa65aQsm8FwQWta67aJ5jvxevbYvQb9KXMIjktE6Bjfc99\n\t+qdj+9uHUs/wJ57/1C53OwLtYKS4obKkResvRdIl+EifMuR9HPPGI/JG9rpNfR7REgOq\n\tDoFtPasZ1sLoJy6UFQrBJ7goIG+PWYh/KutOjZ5Upc1hc7TagtSchDCBtVaNJub/Cpmp\n\tKDEA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Dzl7wLUv\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=hqXvSLF/FzJ8ZxnaWzq1DqalMXYpvLKpZLB9ZCH1uxE=;\n\tb=QHuKBfETGqZ1CkOiX7WiTleg+N+dDraJ67O21bFesAdYho0Z+LywFo5IZ/c3/4RsAQ\n\t+nkDhG2s2UfwsWaHZS4kFXcw2yICmV0sDujDZFZqY+W7CUyRkJb3X/Bp7Dkq2IYoq3tO\n\tEKaZjM6hF2mpgZa9SREhu4pGIXfN15di/vZC3aed2mtQB89AEpNnAjl1QmVY+dYpgMuN\n\tClQKQDQOSzXbTtNODbwgbzbWfryS0xEXKxAJju4Kunh9zPEWcINCqX/cEcbYaSsk9WtC\n\t/EMvckioBHDJFEVwEf+JRuDaLJJBobgV9s1niR3dybNHfigmmtbtaIF31AmLDvepRPBO\n\t2OEQ==","X-Gm-Message-State":"AJIora+ubUm7oTYZ887IC2LrOKoPWzQr2kN5yw7qMHLr+VD833/EL7Jo\n\tv6njgDBj8JVpljc7xdURodL30jnJfBnPtgLikxgGTQ==","X-Google-Smtp-Source":"AGRyM1u/pve8qdic3cZwc/GsucIvCGHkenThO5bYW9wHF3IjJKScgwAm4b5ZU/mdlKe9to+iwd+1FBJvNglMl4obxEI=","X-Received":"by 2002:a17:906:2086:b0:712:1257:77bf with SMTP id\n\t6-20020a170906208600b00712125777bfmr44955940ejq.655.1657179350351;\n\tThu, 07 Jul 2022 00:35:50 -0700 (PDT)","MIME-Version":"1.0","References":"<20220706101836.20153-1-david.plowman@raspberrypi.com>\n\t<20220706101836.20153-4-david.plowman@raspberrypi.com>\n\t<YsXVGvOF9mlPPkKC@pendragon.ideasonboard.com>","In-Reply-To":"<YsXVGvOF9mlPPkKC@pendragon.ideasonboard.com>","Date":"Thu, 7 Jul 2022 08:35:39 +0100","Message-ID":"<CAHW6GYKZdK6gfXAgsD+=DGya0qbDfu+q83Be5zxfuzpzUcAWbg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","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>","From":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>,\n\tWilliam Vinnicombe <william.vinnicombe@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23782,"web_url":"https://patchwork.libcamera.org/comment/23782/","msgid":"<YsaRzQjc7txiAnva@pendragon.ideasonboard.com>","date":"2022-07-07T07:57:01","subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nOn Thu, Jul 07, 2022 at 08:35:39AM +0100, David Plowman wrote:\n> On Wed, 6 Jul 2022 at 19:32, Laurent Pinchart wrote:\n> > On Wed, Jul 06, 2022 at 11:18:36AM +0100, David Plowman via libcamera-devel wrote:\n> > > From: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> > >\n> > > The exif tags are different between raw files from libcamera-apps and\n> > > from Picamera2, causing issues loading data.\n> > >\n> > > Add code to identify which tags are being used, and then load the\n> > > metadata from the correct tags.\n> > >\n> > > Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> > > ---\n> > >  utils/raspberrypi/ctt/ctt_image_load.py | 26 ++++++++++++++++++-------\n> > >  1 file changed, 19 insertions(+), 7 deletions(-)\n> > >\n> > > diff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py\n> > > index 934db123..29c17581 100644\n> > > --- a/utils/raspberrypi/ctt/ctt_image_load.py\n> > > +++ b/utils/raspberrypi/ctt/ctt_image_load.py\n> > > @@ -301,17 +301,29 @@ def dng_load_image(Cam, im_str):\n> > >          metadata.read()\n> > >\n> > >          Img.ver = 100  # random value\n> > > -        Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> > > +        \"\"\"\n> > > +        libcamera-apps create a separate Exif.Subimage1 for the picture\n> > > +        picamera2 stores everything under Exif.Image\n> >\n> > Is this valid according to the DNG specification ? Or is it that\n> > picamera2 produces TIFF/EP files instead of DNG ? Is there a reason not\n> > to use DNG in all cases ?\n> \n> Actually DNG and EXIF are all really flavours of TIFF. I would say\n\nNote that I mentioned TIFF/EP, which is also a different flavour of\nTIFF. Those formats are an utter mess :-)\n\n> that Picamera2, which uses the PiDNG library, does it properly. In C++\n> we use libtiff which, as far as I can tell, doesn't really support\n> \"modern\" flavours of DNG-style TIFF. For example, you can't include\n> exposure times in the main image which PiDNG can.\n\nWhere is the \"modern\" flavour of \"DNG-style TIFF\" documented ? I'm\nlooking at the DNG v1.4.0.0. specification, which states, in the subIFDs\ntrees section,\n\n    DNG recommends the use of SubIFD trees, as described in the TIFF-EP\n    specification. SubIFD chains are not supported.\n\n    The highest-resolution and quality IFD should use NewSubFileType\n    equal to 0. Reduced resolution (or quality) thumbnails or previews,\n    if any, should use NewSubFileType equal to 1 (for a primary preview)\n    or 10001.H (for an alternate preview).\n\n    DNG recommends, but does not require, that the first IFD contain a\n    low-resolution thumbnail, as described in the TIFF-EP specification.\n\nand in the metadata section,\n\n    Additional metadata may be embedded in DNG in the following ways:\n\n    • Using TIFF-EP or EXIF metadata tags\n    • Using the IPTC metadata tag (33723)\n    • Using the XMP metadata tag (700)\n\n    Note that TIFF-EP and EXIF use nearly the same metadata tag set, but\n    TIFF-EP stores the tags in IFD 0, while EXIF store the tags in a\n    separate IFD. Either location is allowed by DNG, but the EXIF\n    location is preferred.\n\nWhile the DNG specification seems to allow storing the EXIF tags in\nIFD0, as well as storing the main image there as well, that isn't\nrecommended. I'm thus curious to know what you mean by \"modern\nflavours\".\n\n> But they are all DNGs, and DarkTable, RawTherapee and dcraw support\n> all of them. Just there are some annoying implementation details...\n> \n> > > +        this code detects which one is being used, and therefore extracts the correct values\n> > > +        \"\"\"\n> > > +        try:\n> > > +            Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> > > +            subimage = \"SubImage1\"\n> > > +            photo = \"Photo\"\n> > > +        except KeyError:\n> > > +            Img.w = metadata['Exif.Image.ImageWidth'].value\n> > > +            subimage = \"Image\"\n> > > +            photo = \"Image\"\n> > >          Img.pad = 0\n> > > -        Img.h = metadata['Exif.SubImage1.ImageLength'].value\n> > > -        white = metadata['Exif.SubImage1.WhiteLevel'].value\n> > > +        Img.h = metadata[f'Exif.{subimage}.ImageLength'].value\n> > > +        white = metadata[f'Exif.{subimage}.WhiteLevel'].value\n> > >          Img.sigbits = int(white).bit_length()\n> > >          Img.fmt = (Img.sigbits - 4) // 2\n> > > -        Img.exposure = int(metadata['Exif.Photo.ExposureTime'].value*1000000)\n> > > -        Img.againQ8 = metadata['Exif.Photo.ISOSpeedRatings'].value*256/100\n> > > +        Img.exposure = int(metadata[f'Exif.{photo}.ExposureTime'].value*1000000)\n> > > +        Img.againQ8 = metadata[f'Exif.{photo}.ISOSpeedRatings'].value*256/100\n> > >          Img.againQ8_norm = Img.againQ8 / 256\n> > >          Img.camName = metadata['Exif.Image.Model'].value\n> > > -        Img.blacklevel = int(metadata['Exif.SubImage1.BlackLevel'].value[0])\n> > > +        Img.blacklevel = int(metadata[f'Exif.{subimage}.BlackLevel'].value[0])\n> > >          Img.blacklevel_16 = Img.blacklevel << (16 - Img.sigbits)\n> > >          bayer_case = {\n> > >              '0 1 1 2': (0, (0, 1, 2, 3)),\n> > > @@ -319,7 +331,7 @@ def dng_load_image(Cam, im_str):\n> > >              '2 1 1 0': (2, (3, 2, 1, 0)),\n> > >              '1 0 2 1': (3, (1, 0, 3, 2))\n> > >          }\n> > > -        cfa_pattern = metadata['Exif.SubImage1.CFAPattern'].value\n> > > +        cfa_pattern = metadata[f'Exif.{subimage}.CFAPattern'].value\n> > >          Img.pattern = bayer_case[cfa_pattern][0]\n> > >          Img.order = bayer_case[cfa_pattern][1]\n> > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 18FF8BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Jul 2022 07:57:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B00163312;\n\tThu,  7 Jul 2022 09:57:29 +0200 (CEST)","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 A9B0A60401\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Jul 2022 09:57:27 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 26974326;\n\tThu,  7 Jul 2022 09:57:27 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657180649;\n\tbh=jtGq3Y3W05oGQxW2umvYxajHE65nZBlDRC7m9c/HUPI=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=GO7+Et0egu2umRrmlGdLRTCf253pFxXtS+lDZdhkeITaQnccXOCutnC01yv7+rUZA\n\tMbo29/wb2rXIzd354ixzrkar1pb5o/g9FiuxJv5tia/Rn13dWBXEi2eZJYGSyF69sY\n\tgH/km1u4juvQknWBRIWq2DMRiEcrHJJ54AvNu/lcT8NGOKqvoKS/1eLD1BfQ5KFq5c\n\tllZrcsXm0taNUmd2IetKq9/0c/ygHjuV56LXM98Ov8iiIMLQdkBwTAYjnUx1op/7V6\n\t0AdhcqLJ9DXULLvBX8ZD87iWTMxS+HtWE48Spjkne2dV9R5600zMSOrZOC3yoFsl+r\n\t6UYcoebxjvUEA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657180647;\n\tbh=jtGq3Y3W05oGQxW2umvYxajHE65nZBlDRC7m9c/HUPI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Ur8smOVPWoON8a6geepMC4s3vqAbZd9doasMrJQb40z1uz7DpI9dwoM92s3lDzrWW\n\tOrFkQdMm68VE6bg962IFxcaM+PJUaf2imzjXrqKxOH2SVNs5IWXAiDy/XDVX4PIoT7\n\tH6A4hZhhGUczpczX9H4a68IeqiIM8ePIueXZ6C00="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Ur8smOVP\"; dkim-atps=neutral","Date":"Thu, 7 Jul 2022 10:57:01 +0300","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YsaRzQjc7txiAnva@pendragon.ideasonboard.com>","References":"<20220706101836.20153-1-david.plowman@raspberrypi.com>\n\t<20220706101836.20153-4-david.plowman@raspberrypi.com>\n\t<YsXVGvOF9mlPPkKC@pendragon.ideasonboard.com>\n\t<CAHW6GYKZdK6gfXAgsD+=DGya0qbDfu+q83Be5zxfuzpzUcAWbg@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<CAHW6GYKZdK6gfXAgsD+=DGya0qbDfu+q83Be5zxfuzpzUcAWbg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>,\n\tWilliam Vinnicombe <william.vinnicombe@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23813,"web_url":"https://patchwork.libcamera.org/comment/23813/","msgid":"<CAEmqJPortvCTRKcwRcDS-BAE7QMsU0cWoxYmgvTcpf9wZEbAsA@mail.gmail.com>","date":"2022-07-11T09:38:42","subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi William,\n\nThank you for your work.\n\nOn Wed, 6 Jul 2022 at 11:18, David Plowman via libcamera-devel <\nlibcamera-devel@lists.libcamera.org> wrote:\n\n> From: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n>\n> The exif tags are different between raw files from libcamera-apps and\n> from Picamera2, causing issues loading data.\n>\n> Add code to identify which tags are being used, and then load the\n> metadata from the correct tags.\n>\n> Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n>\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n\n\n> ---\n>  utils/raspberrypi/ctt/ctt_image_load.py | 26 ++++++++++++++++++-------\n>  1 file changed, 19 insertions(+), 7 deletions(-)\n>\n> diff --git a/utils/raspberrypi/ctt/ctt_image_load.py\n> b/utils/raspberrypi/ctt/ctt_image_load.py\n> index 934db123..29c17581 100644\n> --- a/utils/raspberrypi/ctt/ctt_image_load.py\n> +++ b/utils/raspberrypi/ctt/ctt_image_load.py\n> @@ -301,17 +301,29 @@ def dng_load_image(Cam, im_str):\n>          metadata.read()\n>\n>          Img.ver = 100  # random value\n> -        Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> +        \"\"\"\n> +        libcamera-apps create a separate Exif.Subimage1 for the picture\n> +        picamera2 stores everything under Exif.Image\n> +        this code detects which one is being used, and therefore extracts\n> the correct values\n> +        \"\"\"\n> +        try:\n> +            Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> +            subimage = \"SubImage1\"\n> +            photo = \"Photo\"\n> +        except KeyError:\n> +            Img.w = metadata['Exif.Image.ImageWidth'].value\n> +            subimage = \"Image\"\n> +            photo = \"Image\"\n>          Img.pad = 0\n> -        Img.h = metadata['Exif.SubImage1.ImageLength'].value\n> -        white = metadata['Exif.SubImage1.WhiteLevel'].value\n> +        Img.h = metadata[f'Exif.{subimage}.ImageLength'].value\n> +        white = metadata[f'Exif.{subimage}.WhiteLevel'].value\n>          Img.sigbits = int(white).bit_length()\n>          Img.fmt = (Img.sigbits - 4) // 2\n> -        Img.exposure =\n> int(metadata['Exif.Photo.ExposureTime'].value*1000000)\n> -        Img.againQ8 = metadata['Exif.Photo.ISOSpeedRatings'].value*256/100\n> +        Img.exposure =\n> int(metadata[f'Exif.{photo}.ExposureTime'].value*1000000)\n> +        Img.againQ8 =\n> metadata[f'Exif.{photo}.ISOSpeedRatings'].value*256/100\n>          Img.againQ8_norm = Img.againQ8 / 256\n>          Img.camName = metadata['Exif.Image.Model'].value\n> -        Img.blacklevel =\n> int(metadata['Exif.SubImage1.BlackLevel'].value[0])\n> +        Img.blacklevel =\n> int(metadata[f'Exif.{subimage}.BlackLevel'].value[0])\n>          Img.blacklevel_16 = Img.blacklevel << (16 - Img.sigbits)\n>          bayer_case = {\n>              '0 1 1 2': (0, (0, 1, 2, 3)),\n> @@ -319,7 +331,7 @@ def dng_load_image(Cam, im_str):\n>              '2 1 1 0': (2, (3, 2, 1, 0)),\n>              '1 0 2 1': (3, (1, 0, 3, 2))\n>          }\n> -        cfa_pattern = metadata['Exif.SubImage1.CFAPattern'].value\n> +        cfa_pattern = metadata[f'Exif.{subimage}.CFAPattern'].value\n>          Img.pattern = bayer_case[cfa_pattern][0]\n>          Img.order = bayer_case[cfa_pattern][1]\n>\n> --\n> 2.30.2\n>\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E6A1FBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Jul 2022 09:38:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 20DB563312;\n\tMon, 11 Jul 2022 11:38:58 +0200 (CEST)","from mail-lf1-x132.google.com (mail-lf1-x132.google.com\n\t[IPv6:2a00:1450:4864:20::132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 06F4C60402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jul 2022 11:38:57 +0200 (CEST)","by mail-lf1-x132.google.com with SMTP id f39so7761507lfv.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jul 2022 02:38:56 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657532338;\n\tbh=/xXMwQwUnRIXjKP5mk1y+T5aTlohF9yDvUz0K/dvgng=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=lLPPJVhOsscqV+KGPRFg8LFmLfnQ19jwJ3IUfHyXrJdagrxjypF7VQW14bhMxFCvY\n\tEyYOAO5dqELdvzRkr71Wh2EuQ7faSsUS/K8QZYEpDY0AdTDxodbyNRKJaZM/Rmpis0\n\tuZ5sm/XC8n8wYRTXy/nr3Spj21W+tQ2f/muDe0j/7y9ZXHHWeeYtka9+sujE6aVNAx\n\tzPk9XzUyOMNvu+3PItaOSPHmfHgq3SNyE+62/mQEI9SEVq9i55X063soD017sZ/A7R\n\toQrRhTMlVLP/pd9kNXRRgo7qtgJYsxhAHXc9o0BZJzTJ7FBRoIVwg8210p0ahWqelP\n\tIUHqyUkNXCcRw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=jrMASniDJEtSZUdORRBb3XjlTuxi2KgV3hPtSFnn/dI=;\n\tb=Dbuq6cuQ2mYeADIwO9tUGfqDYVioBYyg5dcec4IGPJP4PvB2yRq5rQglpv6RxnDMCX\n\tRQBuGv1nhyRDVvKqUtGtKktSV4vWzsCEfq6Tr3o2OPZZ5Drwh/97jwjVQkNVm1d+LKqa\n\tI6qSGR70rw3Pe+P4tYkY5+6Gz1Qzd0LCHS75NA9dUvLlnXoZ+OZ6LOf6crsVUK/zxr/p\n\twKw6Rud6iKZffySyR3MOLTC4PzmTTVbpiXh8IkQkkDOVE1dtYrSlew33UFxc5W9FVXkt\n\tU//rFchZi28WOOQYGws12Xxciu2PNK7vU9ELhNsXqbSYiu546fR++2N/Md2OafwK3k3f\n\tkAUg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Dbuq6cuQ\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=jrMASniDJEtSZUdORRBb3XjlTuxi2KgV3hPtSFnn/dI=;\n\tb=R4xCJUx8Q5yZwgKZgoLRcY400Xt87V9N64Ywgny403qRRqxjO2Xop+E5jWP4UU/qBv\n\tpo58Kg37zfxdvbnj88axLr12Hh5MWR/9jIzx1h5ckDkHBlV8RjNsDz4ShBxAuyYt5Mbt\n\tbq35qm6yQEDptnOysOHuj8aUGYZarijabsevknrgfojCIXnashPRdjSqApvJ4LxgkFxx\n\tiVvTLA4ymvgs9psFcQsOS1ieHF0jJRyfgYjA9l0JrBCEJScTSKaeR/IXFL5/VA+SFQBG\n\tYYm8PRzB0HyoLlot8SHogKn4FQh6bu/Mez1DTWMwtIXioW3PKQqtMCV25c/X6kr3GyeR\n\tLc/Q==","X-Gm-Message-State":"AJIora8ddcpKKBhqgKf+JNGjxkEN5l7L7m28+xnV5SEUtmiIoAOQkK8+\n\tz4L9X49hoEWhxqjyF3y+xoQsQdTNyKSQp0ihV2FrQw==","X-Google-Smtp-Source":"AGRyM1vg7MZm92bgRYVqL38sKk7hWFpewPFcJYuLtED4+v2E9mglc65Eh2wzLRFbIHuY3W4On76gWZh76CuXayHROvs=","X-Received":"by 2002:ac2:5de2:0:b0:486:b92d:5d0e with SMTP id\n\tz2-20020ac25de2000000b00486b92d5d0emr11158353lfq.330.1657532336275;\n\tMon, 11 Jul 2022 02:38:56 -0700 (PDT)","MIME-Version":"1.0","References":"<20220706101836.20153-1-david.plowman@raspberrypi.com>\n\t<20220706101836.20153-4-david.plowman@raspberrypi.com>","In-Reply-To":"<20220706101836.20153-4-david.plowman@raspberrypi.com>","Date":"Mon, 11 Jul 2022 10:38:42 +0100","Message-ID":"<CAEmqJPortvCTRKcwRcDS-BAE7QMsU0cWoxYmgvTcpf9wZEbAsA@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"multipart/alternative; boundary=\"0000000000001ba23805e3845279\"","Subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>,\n\tWilliam Vinnicombe <william.vinnicombe@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23815,"web_url":"https://patchwork.libcamera.org/comment/23815/","msgid":"<Ysvw36/ZAWekmf73@pendragon.ideasonboard.com>","date":"2022-07-11T09:43:59","subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Jul 07, 2022 at 10:57:01AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> On Thu, Jul 07, 2022 at 08:35:39AM +0100, David Plowman wrote:\n> > On Wed, 6 Jul 2022 at 19:32, Laurent Pinchart wrote:\n> > > On Wed, Jul 06, 2022 at 11:18:36AM +0100, David Plowman via libcamera-devel wrote:\n> > > > From: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> > > >\n> > > > The exif tags are different between raw files from libcamera-apps and\n> > > > from Picamera2, causing issues loading data.\n> > > >\n> > > > Add code to identify which tags are being used, and then load the\n> > > > metadata from the correct tags.\n> > > >\n> > > > Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>\n> > > > ---\n> > > >  utils/raspberrypi/ctt/ctt_image_load.py | 26 ++++++++++++++++++-------\n> > > >  1 file changed, 19 insertions(+), 7 deletions(-)\n> > > >\n> > > > diff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py\n> > > > index 934db123..29c17581 100644\n> > > > --- a/utils/raspberrypi/ctt/ctt_image_load.py\n> > > > +++ b/utils/raspberrypi/ctt/ctt_image_load.py\n> > > > @@ -301,17 +301,29 @@ def dng_load_image(Cam, im_str):\n> > > >          metadata.read()\n> > > >\n> > > >          Img.ver = 100  # random value\n> > > > -        Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> > > > +        \"\"\"\n> > > > +        libcamera-apps create a separate Exif.Subimage1 for the picture\n> > > > +        picamera2 stores everything under Exif.Image\n> > >\n> > > Is this valid according to the DNG specification ? Or is it that\n> > > picamera2 produces TIFF/EP files instead of DNG ? Is there a reason not\n> > > to use DNG in all cases ?\n> > \n> > Actually DNG and EXIF are all really flavours of TIFF. I would say\n> \n> Note that I mentioned TIFF/EP, which is also a different flavour of\n> TIFF. Those formats are an utter mess :-)\n> \n> > that Picamera2, which uses the PiDNG library, does it properly. In C++\n> > we use libtiff which, as far as I can tell, doesn't really support\n> > \"modern\" flavours of DNG-style TIFF. For example, you can't include\n> > exposure times in the main image which PiDNG can.\n> \n> Where is the \"modern\" flavour of \"DNG-style TIFF\" documented ? I'm\n> looking at the DNG v1.4.0.0. specification, which states, in the subIFDs\n> trees section,\n> \n>     DNG recommends the use of SubIFD trees, as described in the TIFF-EP\n>     specification. SubIFD chains are not supported.\n> \n>     The highest-resolution and quality IFD should use NewSubFileType\n>     equal to 0. Reduced resolution (or quality) thumbnails or previews,\n>     if any, should use NewSubFileType equal to 1 (for a primary preview)\n>     or 10001.H (for an alternate preview).\n> \n>     DNG recommends, but does not require, that the first IFD contain a\n>     low-resolution thumbnail, as described in the TIFF-EP specification.\n> \n> and in the metadata section,\n> \n>     Additional metadata may be embedded in DNG in the following ways:\n> \n>     • Using TIFF-EP or EXIF metadata tags\n>     • Using the IPTC metadata tag (33723)\n>     • Using the XMP metadata tag (700)\n> \n>     Note that TIFF-EP and EXIF use nearly the same metadata tag set, but\n>     TIFF-EP stores the tags in IFD 0, while EXIF store the tags in a\n>     separate IFD. Either location is allowed by DNG, but the EXIF\n>     location is preferred.\n> \n> While the DNG specification seems to allow storing the EXIF tags in\n> IFD0, as well as storing the main image there as well, that isn't\n> recommended. I'm thus curious to know what you mean by \"modern\n> flavours\".\n\nFollowing up on this, I now understand this is meant to support DNG\nfiles created by PiDNG ([1]). I've asked them ([2]) why they use IFD0\ninstead of following the recommendations of the Adobe DNG specification,\nwaiting for a reply.\n\n[1] https://github.com/schoolpost/PiDNG\n[2] https://github.com/schoolpost/PiDNG/issues/65\n\n> > But they are all DNGs, and DarkTable, RawTherapee and dcraw support\n> > all of them. Just there are some annoying implementation details...\n> > \n> > > > +        this code detects which one is being used, and therefore extracts the correct values\n> > > > +        \"\"\"\n> > > > +        try:\n> > > > +            Img.w = metadata['Exif.SubImage1.ImageWidth'].value\n> > > > +            subimage = \"SubImage1\"\n> > > > +            photo = \"Photo\"\n> > > > +        except KeyError:\n> > > > +            Img.w = metadata['Exif.Image.ImageWidth'].value\n> > > > +            subimage = \"Image\"\n> > > > +            photo = \"Image\"\n> > > >          Img.pad = 0\n> > > > -        Img.h = metadata['Exif.SubImage1.ImageLength'].value\n> > > > -        white = metadata['Exif.SubImage1.WhiteLevel'].value\n> > > > +        Img.h = metadata[f'Exif.{subimage}.ImageLength'].value\n> > > > +        white = metadata[f'Exif.{subimage}.WhiteLevel'].value\n> > > >          Img.sigbits = int(white).bit_length()\n> > > >          Img.fmt = (Img.sigbits - 4) // 2\n> > > > -        Img.exposure = int(metadata['Exif.Photo.ExposureTime'].value*1000000)\n> > > > -        Img.againQ8 = metadata['Exif.Photo.ISOSpeedRatings'].value*256/100\n> > > > +        Img.exposure = int(metadata[f'Exif.{photo}.ExposureTime'].value*1000000)\n> > > > +        Img.againQ8 = metadata[f'Exif.{photo}.ISOSpeedRatings'].value*256/100\n> > > >          Img.againQ8_norm = Img.againQ8 / 256\n> > > >          Img.camName = metadata['Exif.Image.Model'].value\n> > > > -        Img.blacklevel = int(metadata['Exif.SubImage1.BlackLevel'].value[0])\n> > > > +        Img.blacklevel = int(metadata[f'Exif.{subimage}.BlackLevel'].value[0])\n> > > >          Img.blacklevel_16 = Img.blacklevel << (16 - Img.sigbits)\n> > > >          bayer_case = {\n> > > >              '0 1 1 2': (0, (0, 1, 2, 3)),\n> > > > @@ -319,7 +331,7 @@ def dng_load_image(Cam, im_str):\n> > > >              '2 1 1 0': (2, (3, 2, 1, 0)),\n> > > >              '1 0 2 1': (3, (1, 0, 3, 2))\n> > > >          }\n> > > > -        cfa_pattern = metadata['Exif.SubImage1.CFAPattern'].value\n> > > > +        cfa_pattern = metadata[f'Exif.{subimage}.CFAPattern'].value\n> > > >          Img.pattern = bayer_case[cfa_pattern][0]\n> > > >          Img.order = bayer_case[cfa_pattern][1]\n> > > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4DCCEBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Jul 2022 09:44:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9CF4863312;\n\tMon, 11 Jul 2022 11:44:28 +0200 (CEST)","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 DED5C60402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jul 2022 11:44:26 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5E59F326;\n\tMon, 11 Jul 2022 11:44:26 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657532668;\n\tbh=BiXhFPuATyqcG0lQJtACrM/ag4KvlXnARNubvjTbjU8=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=dFiT/K3xPah6fc6XyFA0UmwwuXTGrABcHjKDSyKUbPVi2MXBpIQW3DGlZW263g1iY\n\tSEt8K1VZKzXehlgBLDcr11Y22597aAY86ejSZP3OW6QdtyuidN9hs3uKBj+9yOn3QR\n\te3uRTBojd7cpXUGRuOkB4HiVaxO9EG/hnNyMXd0NKlJGasL/Oea2RLKeWVzT2QGoby\n\twnaYTRvfoRsiT/lqtvKdOv8ASemno76f2OpnNCHTcmoJ0mWdMdZNT647Ad8dJ+nm9j\n\tbwJv7GIzeRaErYYzzpUSZmwo8n//HK4BZNBzLZVk4qzQ3NUtpLpXFym6codIL/fecf\n\tyKw/MGjeeClBA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657532666;\n\tbh=BiXhFPuATyqcG0lQJtACrM/ag4KvlXnARNubvjTbjU8=;\n\th=Date:From:To:Subject:References:In-Reply-To:From;\n\tb=dv5Q1Lhpzg1Sb7rQ7KXqL8+jIQQEws0B32Y2QOzCHQLzjdk8DD4bggNysZ/jif0bY\n\tyiwaZdsGiHe2RjEzUnebV01a310xe30MsUUdFP/AiT0bMNvp2bZf+NBDdTdL9Q6LWh\n\tE9NgbjHztl7G7C+owu9yKXp7MpuAZsWlSbmni9Pc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"dv5Q1Lhp\"; dkim-atps=neutral","Date":"Mon, 11 Jul 2022 12:43:59 +0300","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>,\n\tWilliam Vinnicombe <william.vinnicombe@raspberrypi.com>","Message-ID":"<Ysvw36/ZAWekmf73@pendragon.ideasonboard.com>","References":"<20220706101836.20153-1-david.plowman@raspberrypi.com>\n\t<20220706101836.20153-4-david.plowman@raspberrypi.com>\n\t<YsXVGvOF9mlPPkKC@pendragon.ideasonboard.com>\n\t<CAHW6GYKZdK6gfXAgsD+=DGya0qbDfu+q83Be5zxfuzpzUcAWbg@mail.gmail.com>\n\t<YsaRzQjc7txiAnva@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<YsaRzQjc7txiAnva@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 3/3] utils: raspberrypi: ctt:\n\tdng_load_image: Work with DNG files from Picamera2","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]