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
922d8753
Kaydet (Commit)
922d8753
authored
Nis 21, 2013
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Extract IFD processing in Exif.
Change-Id: Ia00803c748cd40b7e2e6142a2802ea6e4e13f8fd
üst
c0bb5832
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
25 deletions
+31
-25
Exif.cxx
vcl/source/filter/jpeg/Exif.cxx
+30
-25
Exif.hxx
vcl/source/filter/jpeg/Exif.hxx
+1
-0
No files found.
vcl/source/filter/jpeg/Exif.cxx
Dosyayı görüntüle @
922d8753
...
...
@@ -155,6 +155,35 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
return
false
;
}
bool
Exif
::
processIFD
(
sal_uInt8
*
pExifData
,
sal_uInt16
aLength
,
sal_uInt16
aOffset
,
sal_uInt16
aNumberOfTags
,
bool
bSetValue
)
{
ExifIFD
*
ifd
=
NULL
;
while
(
aOffset
<=
aLength
-
12
&&
aNumberOfTags
>
0
)
{
ifd
=
(
ExifIFD
*
)
&
pExifData
[
aOffset
];
if
(
ifd
->
tag
==
Tag
::
ORIENTATION
)
{
if
(
bSetValue
)
{
ifd
->
tag
=
Tag
::
ORIENTATION
;
ifd
->
type
=
3
;
ifd
->
count
=
1
;
ifd
->
offset
=
maOrientation
;
}
else
{
maOrientation
=
convertToOrientation
(
ifd
->
offset
);
}
}
aNumberOfTags
--
;
aOffset
+=
12
;
}
return
true
;
}
bool
Exif
::
processExif
(
SvStream
&
rStream
,
sal_uInt16
aSectionLength
,
bool
bSetValue
)
{
sal_uInt32
aMagic32
;
...
...
@@ -193,31 +222,7 @@ bool Exif::processExif(SvStream& rStream, sal_uInt16 aSectionLength, bool bSetVa
aNumberOfTags
<<=
8
;
aNumberOfTags
+=
aExifData
[
aOffset
];
aOffset
+=
2
;
ExifIFD
*
ifd
=
NULL
;
while
(
aOffset
<=
aLength
-
12
&&
aNumberOfTags
>
0
)
{
ifd
=
(
ExifIFD
*
)
&
aExifData
[
aOffset
];
if
(
ifd
->
tag
==
Tag
::
ORIENTATION
)
{
if
(
bSetValue
)
{
ifd
->
tag
=
Tag
::
ORIENTATION
;
ifd
->
type
=
3
;
ifd
->
count
=
1
;
ifd
->
offset
=
maOrientation
;
}
else
{
maOrientation
=
convertToOrientation
(
ifd
->
offset
);
}
}
aNumberOfTags
--
;
aOffset
+=
12
;
}
processIFD
(
aExifData
,
aLength
,
aOffset
+
2
,
aNumberOfTags
,
bSetValue
);
if
(
bSetValue
)
{
...
...
vcl/source/filter/jpeg/Exif.hxx
Dosyayı görüntüle @
922d8753
...
...
@@ -54,6 +54,7 @@ private:
bool
processJpeg
(
SvStream
&
rStream
,
bool
bSetValue
);
bool
processExif
(
SvStream
&
rStream
,
sal_uInt16
aLength
,
bool
bSetValue
);
bool
processIFD
(
sal_uInt8
*
pExifData
,
sal_uInt16
aLength
,
sal_uInt16
aOffset
,
sal_uInt16
aNumberOfTags
,
bool
bSetValue
);
struct
ExifIFD
{
sal_uInt16
tag
;
...
...
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