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
28f820c1
Kaydet (Commit)
28f820c1
authored
Mar 02, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz: don't alloc for bitmap where there isn't enough data to fill
Change-Id: Ief236828f564ff81bf3a415127413b6cc72fd70d
üst
c985cda8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
ipbm.cxx
filter/source/graphicfilter/ipbm/ipbm.cxx
+8
-2
No files found.
filter/source/graphicfilter/ipbm/ipbm.cxx
Dosyayı görüntüle @
28f820c1
...
...
@@ -85,7 +85,13 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
// 0->PBM, 1->PGM, 2->PPM
switch
(
mnMode
)
{
case
0
:
case
0
:
{
const
size_t
nRemainingSize
=
mrPBM
.
remainingSize
();
const
size_t
nDataRequired
=
mnWidth
*
(
mnHeight
/
8
);
if
(
nRemainingSize
<
nDataRequired
)
return
false
;
maBmp
=
Bitmap
(
Size
(
mnWidth
,
mnHeight
),
1
);
mpAcc
=
maBmp
.
AcquireWriteAccess
();
if
(
!
mpAcc
||
mpAcc
->
Width
()
!=
mnWidth
||
mpAcc
->
Height
()
!=
mnHeight
)
...
...
@@ -94,7 +100,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
mpAcc
->
SetPaletteColor
(
0
,
BitmapColor
(
0xff
,
0xff
,
0xff
)
);
mpAcc
->
SetPaletteColor
(
1
,
BitmapColor
(
0x00
,
0x00
,
0x00
)
);
break
;
}
case
1
:
if
(
mnMaxVal
<=
1
)
maBmp
=
Bitmap
(
Size
(
mnWidth
,
mnHeight
),
1
);
...
...
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