Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
95212768
Kaydet (Commit)
95212768
authored
Agu 29, 2013
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i122920 Corrected some minor aspects of DIB clipboard exchange format
üst
98bd1ade
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
dibtools.cxx
vcl/source/gdi/dibtools.cxx
+19
-20
No files found.
vcl/source/gdi/dibtools.cxx
Dosyayı görüntüle @
95212768
...
...
@@ -388,12 +388,12 @@ void ImplDecodeRLE( sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess&
while
(
!
bEndDecoding
&&
(
nY
>=
0L
)
);
}
bool
ImplReadDIBBits
(
SvStream
&
rIStm
,
DIBV5Header
&
rHeader
,
BitmapWriteAccess
&
rAcc
,
BitmapWriteAccess
*
pAccAlpha
,
bool
bTopDown
)
bool
ImplReadDIBBits
(
SvStream
&
rIStm
,
DIBV5Header
&
rHeader
,
BitmapWriteAccess
&
rAcc
,
BitmapWriteAccess
*
pAccAlpha
,
bool
bTopDown
,
bool
&
rAlphaUsed
)
{
const
sal_uLong
nAlignedWidth
=
AlignedWidth4Bytes
(
rHeader
.
nWidth
*
rHeader
.
nBitCount
);
sal_uInt32
nRMask
(
0
);
sal_uInt32
nGMask
(
0
);
sal_uInt32
nBMask
(
0
);
sal_uInt32
nRMask
(
(
rHeader
.
nBitCount
==
16
)
?
0x00007c00UL
:
0x00ff0000UL
);
sal_uInt32
nGMask
(
(
rHeader
.
nBitCount
==
16
)
?
0x000003e0UL
:
0x0000ff00UL
);
sal_uInt32
nBMask
(
(
rHeader
.
nBitCount
==
16
)
?
0x0000001fUL
:
0x000000ffUL
);
bool
bNative
(
false
);
bool
bTCMask
(
!
pAccAlpha
&&
((
16
==
rHeader
.
nBitCount
)
||
(
32
==
rHeader
.
nBitCount
)));
bool
bRLE
((
RLE_8
==
rHeader
.
nCompression
&&
8
==
rHeader
.
nBitCount
)
||
(
RLE_4
==
rHeader
.
nCompression
&&
4
==
rHeader
.
nBitCount
));
...
...
@@ -430,21 +430,12 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
else
{
// Read color mask
if
(
bTCMask
)
if
(
bTCMask
&&
BITFIELDS
==
rHeader
.
nCompression
)
{
if
(
BITFIELDS
==
rHeader
.
nCompression
)
{
rIStm
.
SeekRel
(
-
12L
);
rIStm
>>
nRMask
;
rIStm
>>
nGMask
;
rIStm
>>
nBMask
;
}
else
{
nRMask
=
(
rHeader
.
nBitCount
==
16
)
?
0x00007c00UL
:
0x00ff0000UL
;
nGMask
=
(
rHeader
.
nBitCount
==
16
)
?
0x000003e0UL
:
0x0000ff00UL
;
nBMask
=
(
rHeader
.
nBitCount
==
16
)
?
0x0000001fUL
:
0x000000ffUL
;
}
rIStm
.
SeekRel
(
-
12L
);
rIStm
>>
nRMask
;
rIStm
>>
nGMask
;
rIStm
>>
nBMask
;
}
if
(
bRLE
)
...
...
@@ -601,6 +592,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
aMask
.
GetColorAndAlphaFor32Bit
(
aColor
,
aAlpha
,
(
sal_uInt8
*
)
pTmp32
++
);
rAcc
.
SetPixel
(
nY
,
nX
,
aColor
);
pAccAlpha
->
SetPixelIndex
(
nY
,
nX
,
sal_uInt8
(
0xff
)
-
aAlpha
);
rAlphaUsed
|=
bool
(
0xff
!=
aAlpha
);
}
}
}
...
...
@@ -725,6 +717,8 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
}
// read bits
bool
bAlphaUsed
(
false
);
if
(
!
pIStm
->
GetError
())
{
if
(
nOffset
)
...
...
@@ -732,7 +726,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
pIStm
->
SeekRel
(
nOffset
-
(
pIStm
->
Tell
()
-
nStmPos
));
}
bRet
=
ImplReadDIBBits
(
*
pIStm
,
aHeader
,
*
pAcc
,
pAccAlpha
,
bTopDown
);
bRet
=
ImplReadDIBBits
(
*
pIStm
,
aHeader
,
*
pAcc
,
pAccAlpha
,
bTopDown
,
bAlphaUsed
);
if
(
bRet
&&
aHeader
.
nXPelsPerMeter
&&
aHeader
.
nYPelsPerMeter
)
{
...
...
@@ -758,6 +752,11 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
if
(
bAlphaPossible
)
{
aNewBmpAlpha
.
ReleaseAccess
(
pAccAlpha
);
if
(
!
bAlphaUsed
)
{
bAlphaPossible
=
false
;
}
}
if
(
bRet
)
...
...
@@ -1240,7 +1239,7 @@ bool ImplWriteDIBBody(const Bitmap& rBitmap, SvStream& rOStm, BitmapReadAccess&
if
(
pAccAlpha
)
// only write DIBV5 when asked to do so
{
aHeader
.
nV5CSType
=
0x57696E20
;
// LCS_WINDOWS_COLOR_SPACE
aHeader
.
nV5Intent
=
0x0000000
8
;
// LCS_GM_ABS_COLORIMETRIC
aHeader
.
nV5Intent
=
0x0000000
4
;
// LCS_GM_IMAGES
rOStm
<<
aHeader
.
nV5RedMask
;
rOStm
<<
aHeader
.
nV5GreenMask
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment