bitmap4.cxx (9f62ea84) bitmap4.cxx (87bc88d3)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 842 unchanged lines hidden (view full) ---

851 else
852 {
853 do
854 {
855 for( nY = nY1, nSumR = nSumG = nSumB = 0; nY <= nY2; nY++ )
856 {
857 for( nX = nX1; nX <= nX2; nX++ )
858 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 842 unchanged lines hidden (view full) ---

851 else
852 {
853 do
854 {
855 for( nY = nY1, nSumR = nSumG = nSumB = 0; nY <= nY2; nY++ )
856 {
857 for( nX = nX1; nX <= nX2; nX++ )
858 {
859 const BitmapColor& rCol = pReadAcc->GetPaletteColor( (sal_uInt8) pReadAcc->GetPixel( nY, nX ) );
859 const BitmapColor& rCol = pReadAcc->GetPaletteColor( pReadAcc->GetPixelIndex( nY, nX ) );
860 nSumR += rCol.GetRed();
861 nSumG += rCol.GetGreen();
862 nSumB += rCol.GetBlue();
863 }
864 }
865
866 aCol.SetRed( (sal_uInt8) ( nSumR * fArea_1 ) );
867 aCol.SetGreen( (sal_uInt8) ( nSumG * fArea_1 ) );

--- 138 unchanged lines hidden ---
860 nSumR += rCol.GetRed();
861 nSumG += rCol.GetGreen();
862 nSumB += rCol.GetBlue();
863 }
864 }
865
866 aCol.SetRed( (sal_uInt8) ( nSumR * fArea_1 ) );
867 aCol.SetGreen( (sal_uInt8) ( nSumG * fArea_1 ) );

--- 138 unchanged lines hidden ---