From commits-return-15877-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Sat Oct 12 13:40:42 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 99283180608 for ; Sat, 12 Oct 2019 15:40:42 +0200 (CEST) Received: (qmail 32993 invoked by uid 500); 12 Oct 2019 13:40:42 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 32980 invoked by uid 99); 12 Oct 2019 13:40:42 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Oct 2019 13:40:42 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 68C723A083C for ; Sat, 12 Oct 2019 13:40:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1868338 - /pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDCalRGB.java Date: Sat, 12 Oct 2019 13:40:41 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20191012134041.68C723A083C@svn01-us-west.apache.org> Author: tilman Date: Sat Oct 12 13:40:41 2019 New Revision: 1868338 URL: http://svn.apache.org/viewvc?rev=1868338&view=rev Log: PDFBOX-4341: fix matrix setter (it only stored 6 values of the 3x3 matrix), by Emmeran Seehuber Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDCalRGB.java Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDCalRGB.java URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDCalRGB.java?rev=1868338&r1=1868337&r2=1868338&view=diff ============================================================================== --- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDCalRGB.java (original) +++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDCalRGB.java Sat Oct 12 13:40:41 2019 @@ -174,7 +174,18 @@ public class PDCalRGB extends PDCIEDicti COSArray matrixArray = null; if(matrix != null) { - matrixArray = matrix.toCOSArray(); + // We can't use matrix.toCOSArray(), as it only returns a subset of the matrix + float[][] values = matrix.getValues(); + matrixArray = new COSArray(); + matrixArray.add(new COSFloat(values[0][0])); + matrixArray.add(new COSFloat(values[0][1])); + matrixArray.add(new COSFloat(values[0][2])); + matrixArray.add(new COSFloat(values[1][0])); + matrixArray.add(new COSFloat(values[1][1])); + matrixArray.add(new COSFloat(values[1][2])); + matrixArray.add(new COSFloat(values[2][0])); + matrixArray.add(new COSFloat(values[2][1])); + matrixArray.add(new COSFloat(values[2][2])); } dictionary.setItem(COSName.MATRIX, matrixArray); }