From patchwork Tue Mar 23 08:02:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11654 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 11CF2C32E5 for ; Tue, 23 Mar 2021 08:02:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5773E68D69; Tue, 23 Mar 2021 09:02:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="m7aZMdzo"; dkim-atps=neutral Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EE209602DB for ; Tue, 23 Mar 2021 09:02:39 +0100 (CET) Received: by mail-pf1-x436.google.com with SMTP id x126so13472260pfc.13 for ; Tue, 23 Mar 2021 01:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=95SIiCXBR1XUHASgEzilGxCLaldgcIWx7ba3yX/OiLk=; b=m7aZMdzoXOWbwI/V5Ya/8RePLN7t0LJ+sSUoo93pGO3ayJ2ElRNEhQZEuN6yD9XS79 Qe15bzxyWeZhWEWshaDOFbMwjJbwiIeodRjAfAH0lQ6+ozutPSDg03AgF7aozK1e85Q8 KnFojpE7E12EIti4cgv01JI16M5ygpHrBURng= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=95SIiCXBR1XUHASgEzilGxCLaldgcIWx7ba3yX/OiLk=; b=CO0OGYz26kMpCP5wLiRFZoB5ldTKsCunvyPErvI971jWRYn0195QxQH8H5sgS6TNSS ReaIdiWhaDjD8k62TffMdv0HikncfOqlrgdt63ixG/tKQgh3TtqMeugt/6EnCQAnMyq4 gfGCg6CbXUnBNtoOtCf/6w6uh4KvsL0y8D8SgxxPCvS2lZQxdpKC0aMDkEDHOY9wSBDg tigpIynFtnx3ZE0f/Zsl8+pvvrvA/K+BdASaIq/YLf7RtOSsopDkRdzucYhooXQzsCx8 dVOayf4v8zpciQV8RMt0uV2UDdvRX04IsuRSyp2niRshumxR/DNHr6SFJK5rfZmJ+eQV ZovQ== X-Gm-Message-State: AOAM531uOzvexKlJA9+biFh/IjzRKWYxLQiTwkMCPM5J6TiR+HaobHSB 4ZVEBsiuq314TFu1dG0aQOijuVX7ll//Fw== X-Google-Smtp-Source: ABdhPJx9HTiSJ+rrjCxeQNUt7BBLwiS4WWezLJSgxzujb2h8zgLSaCs/3satIm6mwW6X8AzuHQf0Kw== X-Received: by 2002:a17:902:f242:b029:e4:6dfc:8c1f with SMTP id j2-20020a170902f242b02900e46dfc8c1fmr4173930plc.0.1616486557727; Tue, 23 Mar 2021 01:02:37 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:8115:e5cc:747b:64de]) by smtp.gmail.com with ESMTPSA id j20sm2240256pji.3.2021.03.23.01.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 01:02:37 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 23 Mar 2021 17:02:31 +0900 Message-Id: <20210323080231.3389137-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] android: exif: Contain IMAGE_WIDTH and IMAGE_LENGTH data X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" ChromeOS camera test checks if exif data has the IMAGE_WIDTH and IMAGE_LENGTH and they are the same as the requested jpeg size. This adds the resolution data to exif. Signed-off-by: Hirokazu Honda --- src/android/jpeg/exif.cpp | 2 ++ 1 file changed, 2 insertions(+) -- 2.31.0.rc2.261.g7f71774620-goog diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp index 922086cd..29c7be0f 100644 --- a/src/android/jpeg/exif.cpp +++ b/src/android/jpeg/exif.cpp @@ -286,6 +286,8 @@ void Exif::setModel(const std::string &model) void Exif::setSize(const Size &size) { + setLong(EXIF_IFD_0, EXIF_TAG_IMAGE_LENGTH, size.height); + setLong(EXIF_IFD_0, EXIF_TAG_IMAGE_WIDTH, size.width); setLong(EXIF_IFD_EXIF, EXIF_TAG_PIXEL_Y_DIMENSION, size.height); setLong(EXIF_IFD_EXIF, EXIF_TAG_PIXEL_X_DIMENSION, size.width); }